Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
jakubk
Helper I
Helper I

pivot measures to rows using disconnected table - measures incorrectly ignoring filters

I'm trying to display my measures in a table listing the measures as rows and 'current', prior year', 'change' as columns

 

eg

 

 

| Measure | Current | Prior Period | Change |
|---------|---------|--------------|--------|
|rescues  |       10|             5|       5|
|live     |        1|             3|       2|
|survival |      10%|           60%|     ...|

 

 

 

each of those values is a separate measure in my model (i'm assuming DAX still doesn't have the MDX generic time intelligence utility dimension capabilities?)

 

I thought I could just create a disconnected table with rescues, live, survival in column1 and use a switch statement for current, prior period and change, but the values that come out don't change when i select filters (eg fiscal year)

 

 

 

Current = switch(
    true(),
    'Table'[custom_measure] = "rescues",[Rescues],
    'Table'[custom_measure] = "live",[Live release],
    'Table'[custom_measure] = "survival",[% survival rate]
)

Prior year = switch(
    true(),
    'Table'[custom_measure] = "rescues",[Rescues (prior year)],
    'Table'[custom_measure] = "live",[Live release (prior year)],
    'Table'[custom_measure] = "survival",[% survival rate (prior year)]
)

 

 

 

jakubk_0-1725620523533.png

 

the table in the top left is done via the new measures table but the totals are the unfiltered grand totals (it's ignoring the date filter)

 

What am I doing wrong?

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @jakubk 

Is 'Table'[custom_measure] a column? It appears that your DAX formula is that of a calculated column. Measures in a calculated column do not response to a slicer selection and which value do not refresh until it's been modified or the underlying data has been refreshed. Try either of these as a measure

Current =
SWITCH (
    SELECTEDVALUE ( 'Table'[custom_measure] ),
    "rescues", [Rescues],
    "live", [Live release],
    "survival", [% survival rate]
)


Current =
SWITCH (
    TRUE (),
    SELECTEDVALUE ( 'Table'[custom_measure] ) = "rescues", [Rescues],
    SELECTEDVALUE ( 'Table'[custom_measure] ) = "live", [Live release],
    SELECTEDVALUE ( 'Table'[custom_measure] ) = "survival", [% survival rate]
)




Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

2 REPLIES 2
danextian
Super User
Super User

Hi @jakubk 

Is 'Table'[custom_measure] a column? It appears that your DAX formula is that of a calculated column. Measures in a calculated column do not response to a slicer selection and which value do not refresh until it's been modified or the underlying data has been refreshed. Try either of these as a measure

Current =
SWITCH (
    SELECTEDVALUE ( 'Table'[custom_measure] ),
    "rescues", [Rescues],
    "live", [Live release],
    "survival", [% survival rate]
)


Current =
SWITCH (
    TRUE (),
    SELECTEDVALUE ( 'Table'[custom_measure] ) = "rescues", [Rescues],
    SELECTEDVALUE ( 'Table'[custom_measure] ) = "live", [Live release],
    SELECTEDVALUE ( 'Table'[custom_measure] ) = "survival", [% survival rate]
)




Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hi @danextian thanks for the reply - that worked!

Sorry I should have mentioned - I made a disconnected table using the 'enter data' approach. custom_measure'

 

jakubk_0-1725783775779.png

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors