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.
Hello,
My calculated measure is giving incorrect result when I multiselect the ColAFilter, but same worked fine with single select and multiselect in ColBFilter. below [MeasureA] measure has some caluclation. Now I want this measure to show correct total even when I do multiselect in both the filter.
ColA and ColB are coming from different table.
Test =
IF(
HASONEVALUE(Table[ColB]),
[MeasureA],
SUMX(VALUES(Table[ColB]),
[MeasureA]
))
and when I use the below measure then ColAFilter multiselect work fine but not the ColBFilter.
Test =
IF(
HASONEVALUE(Table[ColA]),
[MeasureA],
SUMX(VALUES(Table[ColA]),
[MeasureA]
))
Thanks
Got the result, Created a composite key in fact table for the dimension ColA and ColB, ColAB= ColA+ColB
Now new measure would be.
Test =
IF(
HASONEVALUE(Table[ColAB]),
[MeasureA],
SUMX(VALUES(Table[ColAB]),
[MeasureA]
))
Both filters are working fine.
Hi @joepath
Can you share a pbix, if necessary with mock data, that reproduces the problem?
|
Please accept the solution when done and consider giving a thumbs up if posts are helpful. Contact me privately for support with any larger-scale BI needs, tutoring, etc. |
Hi @AlB
pbix contain lot of measures with the data which I can not expose it on public forum,
If [MeasureA] is giving the correct row level count then should we worry about what it is the calculation behind this to calculate the correct total?
@joepath Your row value is being calcualted basis row context however, your total is being calculated basis filter context which is independent of your values in the rows. That is why your total may not match with the values in the rows.
see more details about row context and filter context
https://www.statslab-bi.co.nz/project/row-filter-context-dax/
https://www.statslab-bi.co.nz/project/row-filter-context-dax/
https://www.sqlbi.com/articles/row-context-and-filter-context-in-dax/
Proud to be a Super User!
Yes but what is the issue with my caluclation?
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 |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |