Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Please help
Solved! Go to Solution.
Hi,
I am not sure how your semantic model looks like, but I tried to create sample pbix file like below.
Please check the below picture and the attached pbix file.
It is one of ways for creating a measure.
expected result measure: =
SUMX (
VALUES ( data[trans_no] ),
SWITCH (
TRUE (),
CALCULATE ( COUNTROWS ( SUMMARIZE ( data, data[total_disc_amt] ) ) ) = 1
&& CALCULATE ( COUNTROWS ( data ) ) = 1, CALCULATE ( SELECTEDVALUE ( data[total_disc_amt] ) ),
CALCULATE ( COUNTROWS ( SUMMARIZE ( data, data[total_disc_amt] ) ) ) = 1, CALCULATE ( MAX ( data[total_disc_amt] ) ),
CALCULATE ( SUM ( data[total_disc_amt] ) )
)
)
Hi,
I am not sure how your semantic model looks like, but I tried to create sample pbix file like below.
Please check the below picture and the attached pbix file.
It is one of ways for creating a measure.
expected result measure: =
SUMX (
VALUES ( data[trans_no] ),
SWITCH (
TRUE (),
CALCULATE ( COUNTROWS ( SUMMARIZE ( data, data[total_disc_amt] ) ) ) = 1
&& CALCULATE ( COUNTROWS ( data ) ) = 1, CALCULATE ( SELECTEDVALUE ( data[total_disc_amt] ) ),
CALCULATE ( COUNTROWS ( SUMMARIZE ( data, data[total_disc_amt] ) ) ) = 1, CALCULATE ( MAX ( data[total_disc_amt] ) ),
CALCULATE ( SUM ( data[total_disc_amt] ) )
)
)
Just Say Wow. It does work amazingly. It took me one week crazily until this morning.
Thanks a lot.
xxx
Hi there,
I wish to share the right results I get with Measure
User | Count |
---|---|
10 | |
9 | |
7 | |
4 | |
4 |