Hi,
I'd like to be able to create custom subtotals for say Total Revenue based on other values.
I'm using the idea from the video linked below to do this using a SWITCH function.
The irony is the normal values pull through okay, it's the [Total Rev] value that doesn't, which is strange as the card shows the correct value.
How To Create Unique Subtotals In Power BI Tables Using DAX - YouTube
Any help is appreciated.
File is also linked below if it's easier to go through that way, basically the Total Rev figure is 1,000 which doesn't map to the Total Revenue line.
My code:
Selected Year =
VAR CurrentItem = SelectedValue (Sheet1[P&L ])
RETURN
SWITCH( TRUE (),
CurrentItem = "Total Revenue",[Total Rev],
calculate ([Values v2],
filter (Sheet1,Sheet1[P&L ]=CurrentItem)))
I'd like to be able to create custom subtotals for say Total Revenue based on other values.
I'm using the idea from the video linked below to do this using a SWITCH function.
The irony is the normal values pull through okay, it's the [Total Rev] value that doesn't, which is strange as the card shows the correct value.
How To Create Unique Subtotals In Power BI Tables Using DAX - YouTube
Any help is appreciated.
File is also linked below if it's easier to go through that way, basically the Total Rev figure is 1,000 which doesn't map to the Total Revenue line.
My code:
Selected Year =
VAR CurrentItem = SelectedValue (Sheet1[P&L ])
RETURN
SWITCH( TRUE (),
CurrentItem = "Total Revenue",[Total Rev],
calculate ([Values v2],
filter (Sheet1,Sheet1[P&L ]=CurrentItem)))