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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi, I have a table of 21 columns {id, metrics 1, metrics 2, ..., metrics 20}. I want to have 2 slicers in PBI report to select 2 metrics, then dynamically calculate min, max, and median in a table. Now I face the difficulty as DAX does not support dynamic column references directly. Any suggestion on this?
HI @as-nons-kk,
Perhaps you can take a look at the calculate group and field parameter features if they help with your scenario:
Create calculation groups in Power BI (preview) - Power BI | Microsoft Learn
Let report readers use field parameters to change visuals (preview) - Power BI | Microsoft Learn
Regards,
Xiaoxin Sheng
@as-nons-kk From what I understand, you’d like the minimum, maximum, and median values to adjust dynamically based on slicer selections. For instance, when you choose ‘Metric 1,’ your table should display results specific to that ‘Metric 1’ column. To achieve this, consider unpivoting the ‘Metrics 1’ through ‘Metrics 20’ columns in your table using Power Query. This transformation will convert them into rows, simplifying dynamic referencing. Next, calculate the min, median, and max values based on the value column of unpivoted table and incorporate them into your table.
I hope this explanation helps! If it addressed your question, feel free to mark it as the solution!😊
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 11 | |
| 7 | |
| 4 | |
| 4 | |
| 3 |