Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I have a table thats used for reporting, and it needs to be filterable by date, salesman, etc in PowerBI / Excel
ReportColumn | ReportValue |
Sales In US | $### |
Sales in California | $### |
Sales Order Count | ### |
so I bang up a table with three rows and a calculated measure (quasi-code)
ReportValue = switch(ReportValue,"Sales In US",<some calc to get sales only in US>,"Sales In California",<some calc to get sales only in California>,"Sales Order Count",<some calc to get sales order count>)
my problem is that I need <some calc..> to not create its own filter context, because then all my slicers in PowerBI/Excel stop working. I really wish I could use some kind of tuple, or cell address, to specify these values, but it seems like my only choice is summarize/calculate/etc.
To put it another way, I keep hitting the problem mentioned here...
any ideas?
Solved! Go to Solution.
Hi @Anonymous,
Try this:
Create a disconnected calculated table in DAX (no relationship with data table)-
Table = DATATABLE ( "Report", STRING, "Index", INTEGER, { { "Sales in US", 1 }, { "Sales in California", 2 }, { "Sales Order Count", 3 } } )
Then a switching measure
Value = VAR SelectedMeasure = MIN ( 'Table'[Index] ) RETURN IF ( HASONEVALUE ( 'Table'[Report] ), SWITCH ( SelectedMeasure, 1, FORMAT ( [Sales in US], "$#,#" ), 2, FORMAT ( [Sales in California], "$#,#" ), FORMAT ( [Order Count], "0,0" ) ) )
I was having problems because I was not using a totally disconnected table, my table was actually connected to the sales table and it was not giving good behavior for the measure. A totally disconnected table behaves correctly.
Hi @Anonymous,
Try this:
Create a disconnected calculated table in DAX (no relationship with data table)-
Table = DATATABLE ( "Report", STRING, "Index", INTEGER, { { "Sales in US", 1 }, { "Sales in California", 2 }, { "Sales Order Count", 3 } } )
Then a switching measure
Value = VAR SelectedMeasure = MIN ( 'Table'[Index] ) RETURN IF ( HASONEVALUE ( 'Table'[Report] ), SWITCH ( SelectedMeasure, 1, FORMAT ( [Sales in US], "$#,#" ), 2, FORMAT ( [Sales in California], "$#,#" ), FORMAT ( [Order Count], "0,0" ) ) )
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.