The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi Guys,
I want to divide a Matrix row with the line above it in Power BI and I coudnt find a solution to it. please look at the below pivot table in the below link. i couldnt attach file so i am put that on Google sheets.
https://docs.google.com/spreadsheets/d/1nD0H12eUBbtV5YaBrMiswKLpGlhoOYQ5eM4Et_yOx8A/edit?usp=sharing
I need the second table to dynamically respond to the first table. In the file columns are 'country' but if I re place it with Region it should change dynamically. It can be easily done in excel but I am struggling to show that in Power BI.
Any help is appreciated
Solved! Go to Solution.
@Beyeservices , we do not have any method two subtract from last row
but we can do like this
This Stage= CALCULATE(sum('order'[Qty]),filter(ALL('Stage'),'Stage'[Stage]=max('Stage'[Stage])))
Last Stage= CALCULATE(sum('order'[Qty]),filter(ALL('Stage'),'Date'[Stage]=max('Stage'[Stage])-1))
diff = [This Stage] -[Last stage]
if they not numeric we can have rank on them that can work
This Stage= CALCULATE(sum('order'[Qty]), FILTER(ALL('Stage'),'Stage'[StageRank]=max('Stage'[StageRank])))
Last Stage= CALCULATE(sum('order'[Qty]), FILTER(ALL('Stage'),'Stage'[StageRank]=max('Stage'[StageRank])-1))
Hi @Beyeservices ,
You could refer to the following measure.
Measure =
VAR a =
CALCULATE (
[Your value expression],
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Stage]
= MAX ( 'Table'[Stage] ) - 1
&& 'Table'[Country] = MAX ( 'Table'[Country] )
)
)
RETURN
IF ( a = BLANK (), BLANK (), [Your value expression] / a )
@Beyeservices , we do not have any method two subtract from last row
but we can do like this
This Stage= CALCULATE(sum('order'[Qty]),filter(ALL('Stage'),'Stage'[Stage]=max('Stage'[Stage])))
Last Stage= CALCULATE(sum('order'[Qty]),filter(ALL('Stage'),'Date'[Stage]=max('Stage'[Stage])-1))
diff = [This Stage] -[Last stage]
if they not numeric we can have rank on them that can work
This Stage= CALCULATE(sum('order'[Qty]), FILTER(ALL('Stage'),'Stage'[StageRank]=max('Stage'[StageRank])))
Last Stage= CALCULATE(sum('order'[Qty]), FILTER(ALL('Stage'),'Stage'[StageRank]=max('Stage'[StageRank])-1))
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
136 | |
103 | |
101 | |
74 | |
59 |
User | Count |
---|---|
261 | |
123 | |
114 | |
97 | |
84 |