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 @PBCommunity
I spend couple of hours to resolve this but didn't succeed.
I wanted to show the sum of values of prvious quarter based on slicer selection using selected value.
This is how i tried to implement.
I have created a measure to give the previous quarter number as per user selection
output without -1
output with -1
Please help me to resolve this thanks.
Solved! Go to Solution.
@Anonymous
pls try this
Measure 2 =
VAR _q=max('Table'[quarter])
return CALCULATE([Measure],FILTER(all('Table'),'Table'[quarter]=_q-1))
pls see the attachment below
Proud to be a Super User!
Hi @ryan_mayu , Please let me know how will you calculate Previous Year QTD the same way. Thanks
you are welcome
Proud to be a Super User!
@Anonymous , Try like
CALCULATE( sum(Sheet1[amount]),FILTER(all(Sheet1),Sheet1[reason]="A" && Sheet1[quater]=[Previou Quater]))
Better to have a separate Qtr/date Table
This Qtr = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Qtr]=max('Date'[Qtr])))
Last Qtr = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Qtr]=max('Date'[Qtr])-1))
The best is have a Rank on Year Qtr column
Qtr Rank = RANKX(all('Date'),'Date'[Year Qtr],,ASC,Dense) //column
Measure
This Qtr = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Qtr Rank]=max('Date'[Qtr Rank])))
Last Qtr = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Qtr Rank]=max('Date'[Qtr Rank])-1))
Power BI — Qtr on Qtr with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-qtd-questions-time-intelligence-2-5-d842063da839
https://www.youtube.com/watch?v=8-TlVx7P0A0
Thanks @amitchandak for the solution.I have already subscribed your channel and like the way you are helping community.
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |