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.
I need a claculated colmun to identify the first date in a group were the value is between +/- 0.1.
Here is the data, the result Should be the dates indicated in arrow
my DAX:
The intresting part is if i use a specfic value, it works
Solved! Go to Solution.
Thank you both for your suggestions
@amitchandak the Measure you suggested works, but I need a calc column as this will surve as a slicer and grouping agent later on.
When I use you calculated colmun solution I get an error "Earlier/Earliest referes to an earlier context wich does not exist"
@V-lianl-msft
Using you solution for a claculated column I get back the first date of the Lot group, on the dates where the value is between +/- 0.1
I didnt thought it was relevant on my original post, but I might be missing something.
the colmun "PhaseShift" is aclaculated colmun on its one, the calcualte the relative Log diffreance of a specfic atribute in each lot per day.
Maybe this is wnat cousing the problem???
thanks again for you help
eyal
Thank you both for your suggestions
@amitchandak the Measure you suggested works, but I need a calc column as this will surve as a slicer and grouping agent later on.
When I use you calculated colmun solution I get an error "Earlier/Earliest referes to an earlier context wich does not exist"
@V-lianl-msft
Using you solution for a claculated column I get back the first date of the Lot group, on the dates where the value is between +/- 0.1
I didnt thought it was relevant on my original post, but I might be missing something.
the colmun "PhaseShift" is aclaculated colmun on its one, the calcualte the relative Log diffreance of a specfic atribute in each lot per day.
Maybe this is wnat cousing the problem???
thanks again for you help
eyal
Hi @Eyal ,
Based on your description, I have a little confused with your scenario, any chance you can share a PBIX file with dummy data?
Please remove any sensitive data before uploading.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Just figured out what was the mistake from my side.
Your solution works perfeclty.
thank you
Eyal
Hi @Eyal ,
Try this:
latest_date =
CALCULATE (
FIRSTNONBLANK ( 'BR Data'[Date], 1 ),
FILTER (
'BR Data',
'BR Data'[Lot#] = EARLIER ( 'BR Data'[Lot#] )
&& 'BR Data'[BR_Phase] > -0.1
&& 'BR Data'[BR_Phase] <= 0.1
)
)
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Eyal , Can check the data type once should work as new column like
new column =
CALCULATE(
MINX(FILTER('BR Data',
'BR Data'[Lot #]=EARLIER('BR Data'[Lot #]) &&
'BR Data'[BR_Phase] < 0.1 && 'BR Data'[BR_Phase] > - 0.1
)'BR Data'[Date])
)
And new measure like
new measure =
CALCULATE(
MINX(FILTER(allselected('BR Data'),
'BR Data'[Lot #]=max('BR Data'[Lot #]) &&
'BR Data'[BR_Phase] < 0.1 && 'BR Data'[BR_Phase] > - 0.1
)'BR Data'[Date])
)
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 |
---|---|
110 | |
97 | |
77 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |