Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have measure:
% Starts = SUM(STREAMS[Playlist Starts]) / SUMX(ALL(STREAMS),[Playlist Starts])
When the table this column appears in is filtered on another dimension, say [date] the denominator acts like its not affected by the filter but the numerator is.
How do I change this formula to get the correct results?
Solved! Go to Solution.
Hi @StephenF,
Try this one, please. The structure of your mode is the key point.
% Starts = SUM ( STREAMS[Playlist Starts] ) / CALCULATE ( SUMX ( STREAMS, [Playlist Starts] ), ALLEXCEPT ( STREAMS, STREAMS[date] ) )
Best Regards,
Dale
Hi @StephenF,
Try this one, please. The structure of your mode is the key point.
% Starts = SUM ( STREAMS[Playlist Starts] ) / CALCULATE ( SUMX ( STREAMS, [Playlist Starts] ), ALLEXCEPT ( STREAMS, STREAMS[date] ) )
Best Regards,
Dale
Hi @StephenF
What exactly are the "correct results" that you wish? Your code acting is acting as it should
I wish for the denominator to be filtered.
But then you'll always get a 1, won't you? What would be the difference between the numerator and the denominator then?
Yes it will be 1 but it will be correct for that table. The % Total needs to be local to the table object not global.
Consider the following end result as example
Filter: Date=yesterday
Dim1 %Total
dimA 66%
dimB 32%
dimC 2%
Total 100%
User | Count |
---|---|
123 | |
76 | |
63 | |
50 | |
50 |
User | Count |
---|---|
175 | |
125 | |
60 | |
60 | |
58 |