Forum Discussion
Matrix View Column Calculation
Edit: Google Drive Link
Hello,
I have built a view in Excel with three sheets that I am trying to recreate in PowerBI.
The first sheet shows two metrics by region and market, and indicates wher each market is meeting a given target. In excel, this is a simple If/then with conditional formatting, in a column adjacent to the pivot table. What is the equivalent in PowerBI?
The other two sheets are graphs of data over time, trying to show if/when each group exceeds the target. How can I create the target lines in PowerBI?
(First post, is there a way to attach a file to these? Screenshots below)
Sheet 1:
Sheet 2/3:
- Anonymous4 years ago
Hi Anonymous ,
In power bi you can also use the IF function to judge, use the Line and clustered column to see the target value.
https://docs.microsoft.com/en-us/dax/if-function-dax
Here are the steps you can follow:
1. Create measure.
IF = IF( DIVIDE( MAX('Table'[Pre]),100)>=MAX('Table'[Target]),"Yes","No")Targetmeasure = CALCULATE(MAX('Table'[Target]),FILTER(ALL('Table'),'Table'[Row Labels]=MAX('Table'[Row Labels])&&'Table'[Show by Region]=MAX('Table'[Show by Region]))) * 1002. Find Line and clustered column in Visual
3. Result:
If you need pbix, please click here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
10 Replies
- Whitewater100Solution Sage
Hi:
You can use GOOGLE DRIVE, DropBox, WETRANSFER and others. Just click the link to the right of the smiley face on the top ribbon. Better to share data to get proper answer in many cases. FYI>
- AnonymousNot applicable
Thanks, added to the top (I hope it's accessible)
- Whitewater100Solution Sage
Hello:
I could not access it. I don't know how data you have but you can paste right here:
Measure Name Sort Order Today Non App 1 L 7 Day Non App 2 L 8-15 Day Non App 3 L 16-30 Day Non App 4 Over 30 Non App 5 I have to run to appointment to go to shortly, but can look a bit later .Thank you..
- Whitewater100Solution Sage
Hi:
I finally became more free. Were you going to send me an updated file? The one I had opened didn't seem to be the correct one. Sorry about this timing!
- AnonymousNot applicable
Hi Anonymous ,
In power bi you can also use the IF function to judge, use the Line and clustered column to see the target value.
https://docs.microsoft.com/en-us/dax/if-function-dax
Here are the steps you can follow:
1. Create measure.
IF = IF( DIVIDE( MAX('Table'[Pre]),100)>=MAX('Table'[Target]),"Yes","No")Targetmeasure = CALCULATE(MAX('Table'[Target]),FILTER(ALL('Table'),'Table'[Row Labels]=MAX('Table'[Row Labels])&&'Table'[Show by Region]=MAX('Table'[Show by Region]))) * 1002. Find Line and clustered column in Visual
3. Result:
If you need pbix, please click here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly