The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi,
I'm trying to get the flag(0/1) value based on date range selection.
For example my source data is look like
Suppose, I have selected date slicer between 1/1/2022 and 1/5/2022. I'm getting the result is below
But I want to show the output is below, how will I do it?
for your reference, I have attached .pbix file
https://drive.google.com/file/d/1TG_bL_l6gc06XjDgRmkCDgFBUrxysl29/view?usp=sharing
thanks,
Ram
Solved! Go to Solution.
Hi @Ramachandran ,
Try this measure.
Flag =
VAR _maxdate = MAX('Calendar'[Date])
VAR _mindate = MIN('Calendar'[Date])
VAR _date = SELECTEDVALUE('SourceTbl'[Date])
RETURN
IF(_date>_maxdate||_date<_mindate,0,1)
Delete the relationship between the two tables.
The result should be like this and attach the pbix file for reference.
Best Regards,
Community Support Team_Gao
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Hi @Ramachandran ,
Try this measure.
Flag =
VAR _maxdate = MAX('Calendar'[Date])
VAR _mindate = MIN('Calendar'[Date])
VAR _date = SELECTEDVALUE('SourceTbl'[Date])
RETURN
IF(_date>_maxdate||_date<_mindate,0,1)
Delete the relationship between the two tables.
The result should be like this and attach the pbix file for reference.
Best Regards,
Community Support Team_Gao
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
@Ramachandran add +0 to your flag and try
example measure
countrows(Table) +0
Hi Amit,
I have added 0 value in below measure,
but it not change the value. Please assist me
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
99 | |
93 | |
83 | |
64 | |
58 |
User | Count |
---|---|
248 | |
123 | |
112 | |
79 | |
78 |