Episode 6: Dynamic Column Headers

Описание к видео Episode 6: Dynamic Column Headers

Learn how to create dynamic column headers in Power BI that changes with slicer selection
Sample pbix - https://github.com/enad/PowerBI/blob/...
If the resolution is bad, try these:
   • Dymamic Column Headers  
https://www.canva.com/design/DAGJVOrA...

EDIT: use this more optimal formula.
Dynamic Header Measure =
VAR __SELECTED_MEASURE =
SELECTEDVALUE ( DynamicHeaders[Measures] )
VAR __SUBS =
SELECTEDVALUE ( DynamicHeaders[Subsidiary] )
RETURN
IF (
NOT ( ISFILTERED ( Data[Subsidiary] ) ),
SWITCH (
__SELECTED_MEASURE,
"Total Sales", [Total Sales],
"Total Cost", [Total Cost],
"Total GP", [Total GP]
),
SWITCH (
__SELECTED_MEASURE,
"Sales", CALCULATE ( [Total Sales], KEEPFILTERS ( Data[Subsidiary] = __SUBS ) ),
"Cost", CALCULATE ( [Total Cost], KEEPFILTERS ( Data[Subsidiary] = __SUBS ) ),
"GP", CALCULATE ( [Total GP], KEEPFILTERS ( Data[Subsidiary] = __SUBS ) )
)
)

Комментарии

Информация по комментариям в разработке