Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
12 | |
10 | |
10 | |
6 |