Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
10 | |
10 | |
10 | |
9 |
User | Count |
---|---|
20 | |
13 | |
12 | |
11 | |
8 |