Forum Discussion
DAX Measure If Row header is then
Hi,
I have a matrix table where there are 4 row headers for a P&L report. I've been looking for a measure where it would calculate "Global Var% of LY" based on the table maxtrix row name.
The current measure is [Global Total Value LY]-[Global Total Value TY])/[Global Total Value LY].
I'm looking for something that will say IF Row name = TOTAL NEW SALES then
7 Replies
- az38
Community Champion
Hi ttcalendar
If i understand you correct in the most common case you can try a measure like
= IF(MAX('Table'[Row level1]) = 'TOTAL NEW SALES', [Global Total Value TY]-[Global Total Value LY])/[Global Total Value TY], [Global Total Value LY]-[Global Total Value TY])/[Global Total Value LY]) - v-xicai
Community Support
Hi ttcalendar ,
Does that make sense? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.
Best regards
Amy
- VijayP
Community Champion
"[Global Total Value TY]-[Global Total Value LY])/[Global Total Value TY] otherwise for COST OF SALES, DIRECT EXPENSES AND OVERHEADS return [Global Total Value LY]-[Global Total Value TY])/[Global Total Value LY]."
The above statemet is bit confusing. just rephrase it so that I can help. I work PNL in Power bI
- ttcalendarFrequent Visitor
Apologise if this wasn't clear, I have amended my post.
- az38
Community Champion
how should look like value in row TOTAL NEW SALES - Sales?
- amitchandak
Super User
Refer these can help
https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/
https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/
Assuming formula is ([Global Total Value LY]-[Global Total Value TY])/[Global Total Value LY]
Better use : divide([Global Total Value LY]-[Global Total Value TY]),[Global Total Value LY])
- AnonymousNot applicable
I am encountering the same problem. Has anyone figured this out yet?