Forum Discussion
Ration from measure calculated in one column
Hello,
on the screen below I have lines of P&L, which are calculated measures and in columns, I have a column from the data model. I need to calculate a ratio for each P&L line. Is it please possible?
Thanks,
TK
2 Replies
- edhans
Community Champion
Yes, but you've given us no data. You'd likely need something like this:
Pct of Total = VAR varSales = CALCULATE ( SUM ( Table[AOP 2021] ), Table[SomeField] = "10 Net Sales" ) RETURN DIVIDE ( [Your Measure], varSales, BLANK () )That will give a percent of net sales. You could do net income, whatever.
But, you should have measures for everything. Don't drop fields in that give totals. Always use explicit measures, and this is one reason. Where I have [YourMeasure] above doesn't exist if you dropped a field in the visual.To further help, we need data. How to get good help fast. Help us help you.
How To Ask A Technical Question If you Really Want An Answer
How to Get Your Question Answered Quickly - Give us a good and concise explanation
How to provide sample data in the Power BI Forum - Provide data in a table format per the link, or share an Excel/CSV file via OneDrive, Dropbox, etc.. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.- tktomFrequent Visitor
Hi edhans,
thank you so much for your reply, unfortunately, it´s not enough for me. You can find the data on the link below. Ideally, I would need an Index (ratio) and better/worse calculation for each line.
Thank you again,
TK