Forum Discussion
StaceyGriffeth
5 years agoHelper II
Dynamic table column name
Is there a way to have the column name in a table visual dynamically update? For example, I have a Trailing Twelve Month where it lists the current month and previous 11 month income statements. Th...
Anonymous
5 years agoNot applicable
Hi StaceyGriffeth ,
According to my understand ,you want to dynamically display data in last X months based on Slicer,right?
You could use the following formula:
DateSlicer =
ALLSELECTED ( RevenueTable[Date] )flagForSelected =
VAR _sele =
SELECTEDVALUE ( DateSlicer[Date] )
VAR _diff =
DATEDIFF ( _sele, SELECTEDVALUE ( RevenueTable[Date] ), MONTH )
RETURN
IF ( _diff < 0 && _diff >= -6, 1 )toRemoveOtherColumns =
SUM ( RevenueTable[Revenue] ) * [flagForSelected]sumForRow =
SUMX ( RevenueTable, [toRemoveOtherColumns] )My visualization looks like this:
Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please upload some insensitive data samples and expected output.
Best Regards,
Eyelyn Qin