Forum Discussion
BaldAccountant
3 years agoHelper III
Power pivot - Dynamic Measure
I am tyring to create a dynamic measure based on a post on another website in power pivot. There are two elements: -a table that creates dynamic choice of row values (i.e. parse out by insurance ty...
- 3 years ago
BaldAccountant
I've changed the data model relaying more on DAX. Please refer to attached sample file.= VAR FilterTable = FILTER ( Data, CONTAINS ( VALUES ( Groups[Group Values] ), Groups[Group Values], Data[FC] ) || CONTAINS ( VALUES ( Groups[Group Values] ), Groups[Group Values], Data[Specialty] ) ) RETURN SWITCH ( MIN ( Multi[MSR Number] ), 1, DIVIDE ( CALCULATE ( [Cases], FilterTable ), [Cases] ), 2, DIVIDE ( CALCULATE ( [Charges], FilterTable ), [Charges] ) )
tamerj1
3 years agoCommunity Champion
BaldAccountant
I've changed the data model relaying more on DAX. Please refer to attached sample file.
=
VAR FilterTable =
FILTER (
Data,
CONTAINS ( VALUES ( Groups[Group Values] ), Groups[Group Values], Data[FC] )
|| CONTAINS (
VALUES ( Groups[Group Values] ),
Groups[Group Values], Data[Specialty]
)
)
RETURN
SWITCH (
MIN ( Multi[MSR Number] ),
1, DIVIDE ( CALCULATE ( [Cases], FilterTable ), [Cases] ),
2, DIVIDE ( CALCULATE ( [Charges], FilterTable ), [Charges] )
)BaldAccountant
3 years agoHelper III
Thank you very much! You are amazing.
This is the first time I have posted a question here. It's the first time I could not solve something on my own and it felt like I was quitting, but I guess everyone needs a little help from time to time.