DAX help
 

MegaSack DRAW - This year's winner is user - rgwb
We will be in touch

[Closed] DAX help

3 Posts
2 Users
0 Reactions
63 Views
Posts: 10864
Full Member
Topic starter
 

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 8:49 am
Posts: 17
Free Member
 

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


 
Posted : 02/03/2017 9:16 am
Posts: 10864
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 9:22 am
Posts: 10864
Full Member
Topic starter
 

Sorted!

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


 
Posted : 02/03/2017 10:58 am