cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

PGM % help

We are converting from Tableau to Power BI. I have a PGM% calc in Tableau = sum(PGM Numerator)/sum(PGM Denominator) where the numerator is PGM and the denominator is sales that will use the filters in the report to calculate the %. I can't seem to get this to work in Power BI.

PGM % =
VAR
Net_Sales =CALCULATE([Bridges Live Scale], 'Report Line Hierarchy'[Report Line for Reporting]="Sales", 'Bridges Base Data'[Category] = "CY Forecast")
VAR
PGM =CALCULATE([Bridges Live Scale],'Report Line Hierarchy'[Report Line for Reporting]="PGM", 'Bridges Base Data'[Category] = "CY Forecast")
return
Calculate(DIVIDE(PGM,Net_Sales,0))
 
I can get the Sales and PGM values to populate in my visual using the above calculation and reflect my filters but the PGM % returns a 0% regardless. I think I am missing the SUM function from Tableau but don't know where to apply it.
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Helper I
Helper I

Re: PGM % help

I figured it out. No further work required!!

View solution in original post

4 REPLIES 4
Highlighted
Super User IV
Super User IV

Re: PGM % help

@pattyor1 , measure [Bridges Live Scale] should be sum measure. Category and Report Line for Reporting do not have other filters on-page or visual

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

 

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

Highlighted
Helper I
Helper I

Re: PGM % help

Hello

Bridges Live Scale = round(IF(HASONEVALUE(Scale[Scale]),SUM('Bridges Base Data'[Amount Correct Sign])/VALUES(Scale[Scale]),SUM('Bridges Base Data'[Amount Correct Sign])),2)

 

Scale = Thousands or millions

 

The category can be in the filter. I was troubleshooting so I put it in the measure. The only filter we need in the calc is the reportline Sales for the one and PGM for the other. I can get those numbers but when I divide them, I get nothing.

Capture.PNG

 

Highlighted
Helper I
Helper I

Re: PGM % help

Here is a pic of our Bridges Base Data. We use the Report Line Code to pick the Sales and PGM. 

Capture.PNG

Highlighted
Helper I
Helper I

Re: PGM % help

I figured it out. No further work required!!

View solution in original post

Helpful resources

Announcements
May 2020 Community Highlights

May 2020 Community Highlights

It’s time for another PBI Community recap!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Top Solution Authors