Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
I am trying to create a column in power bi that will change based on a slicer selection. For example, let's say that I have the table below:
Date | Column A | Column B 1/1/2019 5 6
I want to be able to create a column (or measure) that will store the value by row of Date+ColumnA or ColumnB based on a slicer. So if I have a slicer that has "Column A" selected, there would be a column (Column C) that would have 1/6/2019 (Date+Column A)
Does anyone have any ideas for how to do this?
Solved! Go to Solution.
One possibility:
1. Store the Date +A as one Calculated Column, Date +B as s second Calculated column
2. Create a disconnected Parameters table, with column Add Type.
3. Create a measure like this: (You could do the date math in the measure, but I find it cleaner to do it this way and it may improve performance.)
Date Picker =
IF(
SELECTEDVALUE('Parameters'[Add Type]) = "A",
MAX(<yourtable>[DateA]),
MAX(<yourtable>[DateB])
)
One possibility:
1. Store the Date +A as one Calculated Column, Date +B as s second Calculated column
2. Create a disconnected Parameters table, with column Add Type.
3. Create a measure like this: (You could do the date math in the measure, but I find it cleaner to do it this way and it may improve performance.)
Date Picker =
IF(
SELECTEDVALUE('Parameters'[Add Type]) = "A",
MAX(<yourtable>[DateA]),
MAX(<yourtable>[DateB])
)
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 48 | |
| 40 | |
| 38 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 68 | |
| 65 | |
| 30 | |
| 26 | |
| 25 |