cancel
Showing results for
Did you mean:
New Member

## Matrix View Column Calculation

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:

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

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

3. Result:

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 10
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")``````

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

3. Result:

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

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!

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>

New Member

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

Super User

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

New Member

Super User

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.

New Member

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

Super User

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:

New Member

?

Announcements

#### Join Arun Ulag at MPPC23

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

#### Power BI September 2023 Update

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

#### Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

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