Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi ,
I have two tables:
one with a parent-child hierarchy
and another containing the data
I created a measure to calculate the total on each parent :
Mesure = var c = IF(HASONEVALUE(Hierachie[IdLigne]);VALUES(Hierachie[IdLigne]);BLANK()) RETURN CALCULATE (
sum('Fact'[Amount]);
ALL('Fact');
PATHCONTAINS (Hierachie[HierarchiePath]; c )
)
It works fine but i can't use the slicers (Area and Region) , normal because i use "All" in measure.
What I would like to be able to filter and always show all the codes even if I do not have amount.
For Example i select "Area : A0001" and "Region : R001" i would like to have this result :
Code | Amount
10 | 102
20 | 0
30 | 102
40 | 12048
50 | 0
60 | 12048
70 | 0
80 | 12150
Thank you for your help .
Regards
Solved! Go to Solution.
Whoops, my mistake, I didn't read close enough. You can try create a measure along the lines of:
Measure = VAR __amount = SUM(Table[Amount]) RETURN IF(ISBLANK(__amount),0,__amount)
Try ALLSELECTED instead of ALL?
Whoops, my mistake, I didn't read close enough. You can try create a measure along the lines of:
Measure = VAR __amount = SUM(Table[Amount]) RETURN IF(ISBLANK(__amount),0,__amount)
Hi Greg,
I have the same problem as Bacou, but couldn't understand what your solution means.
I'm studying DAX as beginner, and will be appreciated if you can provide actual code based on Becou's problem. I'll apply it with my case.
Thank you.
Pat.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |