Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

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:

duggana114_0-1653320029796.png

Sheet 2/3:

duggana114_1-1653320078832.png

 

 

1 ACCEPTED SOLUTION
Anonymous
Not 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")

vyangliumsft_0-1653561592850.png

Targetmeasure =
CALCULATE(MAX('Table'[Target]),FILTER(ALL('Table'),'Table'[Row Labels]=MAX('Table'[Row Labels])&&'Table'[Show by Region]=MAX('Table'[Show by Region]))) * 100

2. Find Line and clustered column in Visual

 

vyangliumsft_1-1653561592852.png

3. Result:

vyangliumsft_2-1653561592858.png

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

View solution in original post

10 REPLIES 10
Anonymous
Not 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")

vyangliumsft_0-1653561592850.png

Targetmeasure =
CALCULATE(MAX('Table'[Target]),FILTER(ALL('Table'),'Table'[Row Labels]=MAX('Table'[Row Labels])&&'Table'[Show by Region]=MAX('Table'[Show by Region]))) * 100

2. Find Line and clustered column in Visual

 

vyangliumsft_1-1653561592852.png

3. Result:

vyangliumsft_2-1653561592858.png

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

Whitewater100
Solution Sage
Solution 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! 

Whitewater100
Solution Sage
Solution 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>

Anonymous
Not applicable

Thanks, added to the top (I hope it's accessible)

Hello:

I could not access it. I don't know how data you have but you can paste right here:

Measure NameSort Order
Today Non App1
L 7 Day Non App2
L 8-15 Day Non App3
L 16-30 Day Non App4
Over 30 Non App5

I have to run to appointment to go to shortly, but can look a bit later .Thank you..

Anonymous
Not applicable

I tried a Google Drive Link instead of Dropbox

Hi:

I've been tring to get your data to work. For some reson I can not get your Group B to show up on the report. I was using your main file tab called "Original Data". I feel like I have some bug with this aprticular file. I will attach, what should be the proper model to analyze this.

I'm not sure wheree to go from here although maybe you can try to get both groups to ahow up? Sorry about the delay.

https://drive.google.com/file/d/1N9kzEi84-RcMa3_AngOetF1ohQsNA86b/view?usp=sharing 

Anonymous
Not applicable

I don't see a file to open. This is what I see with your google drive link:

duggana114_0-1653432832519.png

 

Hi:

I see. If you look at that page and look to far left hand upper corner, you will see a downloa arrow.  You click to download. It is the 3rd icon from top left. I'll paste example here:

Whitewater100_0-1653482357440.png

 

Anonymous
Not applicable

?

duggana114_0-1653486903350.png

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.