The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
I have 2 Flag fields(working as slicers and Containing values as YES and NO). I need to write a DAX including both flag fields in a IF condition such as WHEN these slicers are selected as YES then my measure should show as BLANK.
Eg:--(Below DAX I created but its not working)
Forecast Revenue =
VAR SelectionP = SELECTEDVALUE(DT_Table1[Custom flag 1])
VAR SelectionT = SELECTEDVALUE(DT_Table2[Custom flag 1])
RETURN
IF (
SelectionP = "Yes",
BLANK(),
IF (
SelectionT = "Yes",
BLANK(),
CALCULATE(
[Forecast Revenue], FT_Forecast[Fiscal Calendar[Quarter Aging]]]=0
)
))
Any help will be appreciated.
Thanks
AP
Solved! Go to Solution.
@Anupal Hi! Try with:
Forecast Revenue =
VAR SelectionP = SELECTEDVALUE(DT_Table1[Custom flag 1])
VAR SelectionT = SELECTEDVALUE(DT_Table2[Custom flag 1])
RETURN
IF (
SelectionP = "Yes" || SelectionT = "Yes", -- Check if either of the flags is "Yes"
BLANK(),
CALCULATE(
[Forecast Revenue],
FT_Forecast[Fiscal Calendar[Quarter Aging]] = 0 -- Corrected the filter condition
)
)
BBF
Hi,
Here is one way to do this:
Now if both selections are yes the value is blank. You can add different cases like this:
Place your measure where 10 000 value is.
Proud to be a Super User!
Hi,
Here is one way to do this:
Now if both selections are yes the value is blank. You can add different cases like this:
Place your measure where 10 000 value is.
Proud to be a Super User!
@Anupal Hi! Try with:
Forecast Revenue =
VAR SelectionP = SELECTEDVALUE(DT_Table1[Custom flag 1])
VAR SelectionT = SELECTEDVALUE(DT_Table2[Custom flag 1])
RETURN
IF (
SelectionP = "Yes" || SelectionT = "Yes", -- Check if either of the flags is "Yes"
BLANK(),
CALCULATE(
[Forecast Revenue],
FT_Forecast[Fiscal Calendar[Quarter Aging]] = 0 -- Corrected the filter condition
)
)
BBF
User | Count |
---|---|
15 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
24 | |
14 | |
13 | |
8 | |
8 |