Forum search & shortcuts

DAX help
 

[Closed] DAX help

Posts: 10976
Full Member
Topic starter
 
[#8379648]

We're just adopting Power BI, and I need to build a report with a matrix in it:

Rows are year
Columns are product and size

one view to show volume sold (which is easy), one to show % of size sold for each product, so each product's %s add up to 100 for each year (which is doing my head in). eg. for Product A, 30% Small, 50% Medium, 20% Large. Everything's in one table with

customer number, transaction date, product, size

It should be doable in DAX but my knowledge of that is currently limited, any experts to give me the correct expression?


 
Posted : 02/03/2017 9:49 am
Posts: 52609
Free Member
 

What's the data in? Sql? Do a view of the data first and work the sql server


 
Posted : 02/03/2017 10:16 am
Posts: 10976
Full Member
Topic starter
 

Yep sql server is the source, I could just fix it in the query but thought DAX would be up to the job.


 
Posted : 02/03/2017 10:22 am
Posts: 10976
Full Member
Topic starter
 

Sorted!

% Sales = count(customer number)/calculate(count(customer number), ALLSELECTED(size))


 
Posted : 02/03/2017 11:58 am