Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
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
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 13 | |
| 9 | |
| 8 | |
| 8 | |
| 7 |