Forum Discussion
BUC
2 years agoFrequent Visitor
Using different data types on the same row in a matrix
I have a client who has asked for a Power BI version of this spreadsheet, basically: I've tried to replicate this using a Matrix, but I can't get YoY underneath 2023 and 2024 - I've had to ...
- Anonymous2 years ago
Hi BUC ,
I created a sample pbix file(see the attachment), please check if that is what you want.
1. Create the measures as below
Current Year value = CALCULATE(SUM('Table'[Value]),YEAR('Table'[Date])=YEAR(TODAY()))Previous year value = CALCULATE(SUM('Table'[Value]),YEAR('Table'[Date])=YEAR(TODAY())-1)YoY = [Current Year value]-[Previous year value]YoY% = DIVIDE([YoY],[Previous year value])2. Create a matrix visual with the below Fields and format settings
Create a matrix visual
Toggle on the option "Switch values to rows"
Best Regards
Anonymous
2 years agoNot applicable
Hi BUC ,
I created a sample pbix file(see the attachment), please check if that is what you want.
1. Create the measures as below
Current Year value = CALCULATE(SUM('Table'[Value]),YEAR('Table'[Date])=YEAR(TODAY()))Previous year value = CALCULATE(SUM('Table'[Value]),YEAR('Table'[Date])=YEAR(TODAY())-1)YoY = [Current Year value]-[Previous year value]YoY% = DIVIDE([YoY],[Previous year value])
2. Create a matrix visual with the below Fields and format settings
Create a matrix visual
Toggle on the option "Switch values to rows"
Best Regards
BUC
2 years agoFrequent Visitor
That's exactly what I need - you're a genius! Thanks so much 🙂