[Solved] what is the weight of an item in it's category?

Anything related to PowerPivot and DAX Formuale
Bernard Heymans
Posts: 4
Joined: Wed Feb 28, 2018 12:18 am

[Solved] what is the weight of an item in it's category?

Postby Bernard Heymans » Tue Jun 19, 2018 12:52 am

Hi ,


I need to be able to compare the volume of one specific item to the total volume of it's category...

If I show the categories on screen, not an issue: I see the total for each item with the total of its category.
But if I DON'T SHOW the categories, I see the total volume for ALL categories (and not for one specific )
my measure: :=CALCULATE([Total],ALLEXCEPT(Cat,Cat[cat1]))


I have created a light example of the problem.


in green info that are correct, but in red what is wrong .





Thanks for the help


Bernard
Attachments
Total per cat1.xlsx
(145.56 KiB) Downloaded 35 times
Last edited by Bernard Heymans on Mon Jun 25, 2018 6:36 pm, edited 1 time in total.

ozeroth
Posts: 21
Joined: Mon Apr 06, 2015 6:02 am
Location: Auckland, New Zealand

Re: what is the weight of an item in it's category?

Postby ozeroth » Sat Jun 23, 2018 10:13 pm

Hi Bernard,
I would recommend something like this (using the naming from the Excel file you posted):

This will give you the total for the visible Categories, removing any filters on what, but retaining all other filters.
Depending on the exact behaviour you want, you could change ALL ( Table1[what] ) to ALL ( Table1 ), which would give you the total for the visible Categories with all other filters removed.

The key thing with this measure is to include VALUES ( Table1[cat] ) as a filter argument of CALCULATE, which keeps the visible values of Table1[cat] even if ther is not a filter specifically on Table1[cat].

Regards,
Owen

Bernard Heymans
Posts: 4
Joined: Wed Feb 28, 2018 12:18 am

Re: [Solved] what is the weight of an item in it's category?

Postby Bernard Heymans » Mon Jun 25, 2018 6:37 pm

Hi Owen,


Thanks, this is exactly what I searched.

Now a little time to understand & make this mine....

THANKS, THANKS , THANKS


Bernard.

Bernard Heymans
Posts: 4
Joined: Wed Feb 28, 2018 12:18 am

Re: [Solved] what is the weight of an item in it's category?

Postby Bernard Heymans » Wed Jun 27, 2018 9:37 pm

ok,

Now I can handle this with no problem: see attached file


Thanks again
Attachments
Total per cat1 v3.xlsx
(165.24 KiB) Downloaded 35 times


Return to “PowerPivot/DAX”

Who is online

Users browsing this forum: No registered users and 4 guests