cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
duggana114
New Member

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
v-yangliu-msft
Community Support
Community Support

Hi  @duggana114 ,

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
v-yangliu-msft
Community Support
Community Support

Hi  @duggana114 ,

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
Super User
Super User

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
Super User
Super User

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>

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..

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 

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

 

?

duggana114_0-1653486903350.png

 

Helpful resources

Announcements
Join Arun Ulag at MPPC23

Join Arun Ulag at MPPC23

Get a sneak peek into this year's Power Platform Conference Keynote.

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors
Top Kudoed Authors