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 have two measure values. One specific for January and other for rest of the months. If Jan is selcted then display Jan value else display other value. Can this be done using an switch?
Final Term:=
SWITCH(
TRUE(),
VALUES('Forecast Calendar'[Month Short Name])="Jan",[January Terms],
[Terms Non-Blank]
)
Solved! Go to Solution.
Well yes it can although I probably would not use SWITCH for only 1 condition but rather if there are multiple conditions
Final Term =
SWITCH (
VALUES ( 'Forecast Calendar'[Month Short Name] ),
"Jan", [January Terms],
[Terms Non-Blank]
)I probably would go with this since there's only 1 IF Statement
Final Term =
IF (
SELECTEDVALUE ( 'Forecast Calendar'[Month Short Name] ) = "Jan",
[January Terms],
[Terms Non-Blank]
)However they should both work! ![]()
Well yes it can although I probably would not use SWITCH for only 1 condition but rather if there are multiple conditions
Final Term =
SWITCH (
VALUES ( 'Forecast Calendar'[Month Short Name] ),
"Jan", [January Terms],
[Terms Non-Blank]
)I probably would go with this since there's only 1 IF Statement
Final Term =
IF (
SELECTEDVALUE ( 'Forecast Calendar'[Month Short Name] ) = "Jan",
[January Terms],
[Terms Non-Blank]
)However they should both work! ![]()
Doesn't like the syntax for 'SELECTEDVALUE'. The SWITCH works just for Jan but when I select Feb, it displays 0 instead of the feb terminations.
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 |
|---|---|
| 43 | |
| 38 | |
| 34 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 65 | |
| 65 | |
| 30 | |
| 26 | |
| 25 |