Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
HI, I have a slicer date, i create two measure column to calculate the max and min of the dates in the slicer.
Example: The slicer had: 2/1/2017 to 2/11/2017.
MinDate = MIN(Query1[EffectiveDate])
2/1/2017
MaxDate = MAX(Query1[EffectiveDate])
2/11/2017
I want make another measure column to calculate how many days are in between.
NumDayBetween = DATEDIFF([MinDate],[MaxDate],DAY)
Result: 8
And if a chosse 2/1/2017 to 2/1/2017. NumDayBetween = 0
Why?
Solved! Go to Solution.
Hi @sixtoquiles
You say that "And if a chosse 2/1/2017 to 2/1/2017. NumDayBetween = 0"
To me they are the same day and so therefore the correct answer should be 0
I note in your image, you have different dates selected and that the MAX measure doesn't match the slicer selection.
I would recommend creating this on a DATE table where you are guaranteed to have 1 row per day with no gaps. If your data table (in this case Query1) has no data on some days, you might see some odd things like this.
Hi @sixtoquiles
You say that "And if a chosse 2/1/2017 to 2/1/2017. NumDayBetween = 0"
To me they are the same day and so therefore the correct answer should be 0
I note in your image, you have different dates selected and that the MAX measure doesn't match the slicer selection.
I would recommend creating this on a DATE table where you are guaranteed to have 1 row per day with no gaps. If your data table (in this case Query1) has no data on some days, you might see some odd things like this.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
97 | |
82 | |
75 | |
66 |
User | Count |
---|---|
126 | |
105 | |
103 | |
81 | |
72 |