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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi guys,
I made a switch function that gives me the status of our machines ->
Hi there.
As far as I know, you can use a SQL query as a source for your tables. Here's the query that you should use:
SELECT
t.Status,
t.StatusOrder
FROM (
VALUES
('Red', 1),
('Amber', 2),
('Green', 3)
) AS t([Status], [StatusOrder])
Since it does not require any tables from your database, it should work OK. [StatusOrder] is there to be able to sort the statuses correctly, not alphabetically. When you press Get Data, you'll select the source to be your SQL Server, then you'll expand the section Advanced and input your query in the box. Easy. I've checked it and it works.
Hi daxer,
Thanks for your feedback. Unfortunatelly, i dont have access to SQL.
My challenge is to build the slicer based only on calculated measures. 😕
Hi daxer,
I have a pre-set query from HANA, i just pick a table from there. does that make it clear for you?
Alright, thanks!
@Anonymous , I think in direct query you add table using enter data. It changes the mode to mix.
rest of the approach will be like https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slicer-parameter-table-pattern
Hi amitchandak,
Thanks for your feedback! Unfortunatelly, i cannot "enter data", this option is greyed out to me.
For the suggested approach, i would need to create a diconnected table, which i cannot do due to the direct query.
Any other ideas to solve my issue?
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 6 | |
| 6 | |
| 6 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 18 | |
| 14 | |
| 14 |