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.
Hi,
How can i add 2 rows in my table in which one row shows sum all values as 'T' and other row will shows sum of only values in bottom 4 rows as 'F'.
Here stage is coming from a table and 'current','previous','%change' are measures
HI, @jatneerjat
After my research, you could try this way:
Step1:
Add a Stage table with two more rows like this:(In my simple case, I just show top2 result as "F")
Then create a relationship with basic data table.
Step2:
Create the rank measure for each measure
Rank = RANKX(ALL('Table1'), [sumqty])
Step3:
Add a new measure for 'current'
Measure = IF ( SELECTEDVALUE ( Table2[Stage] ) = "TOTAL", CALCULATE ( [sumqty], ALL(Table2[Stage]) ), IF ( SELECTEDVALUE ( Table2[Stage] ) = "TOP2", SUMX ( FILTER ( ALL ( 'Table2'[Stage] ), [Rank] <= 2 ), [sumqty] ), [sumqty] ) )
Result:
You could also add new measure for 'previous','%change' by the same logic.
here is pbix file, please try it.
and this is the same logic post I have solved for you refer to
https://community.powerbi.com/t5/Desktop/Top-N-and-Others-monthly/m-p/490708#M228672
Best Regards,
Lin
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 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |