Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello!
I have a Date column and I need to make a measure which is based on this sample:
The dates are always on a 12-month period. I made a measure for CEI and my goal is for the CEI to have a blank data for the first month (due to insufficient data because my date will always be on a 12-month period). My CEI measure formula is okay except for the first data on the first month, I would like it to be blank. So I tried to make a measure using an if else statement where I'd like to check the Month of my Date column, however, my Date column is not on the list of columns/measures that I use to have computations with.
Is there any other approach for this? Thanks in advance!
Solved! Go to Solution.
If the date columns are from the date table (Dates in this example), you could add this to the end of your measure:
IF ( MONTH ( MAX ( Dates[Date] ) ) = 1, BLANK (), MeasureValueHere )
This assumes the Dates table has a relationship with the data table.
Proud to be a Super User!
Hi @crln-blue ,
Try this measure
CEI1 = IF(NOT(LEFT(MAX('Table'[Type]),3)="Jan"),MeasureValueHere))
Make sure "Show items with no data" has been enabled.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If function is not showing the date column for calcumation, please suggest
Hello to @DataInsights and @v-stephen-msft !
Thank you for the reply. My first month is being calculated automatically and I just want it to leave it blank. I solved the problem by writing an IF statement because I also have another measure which is blank wherein my CEI measure is dependent to. All your answers are correct and thanks!
Hi @crln-blue ,
Try this measure
CEI1 = IF(NOT(LEFT(MAX('Table'[Type]),3)="Jan"),MeasureValueHere))
Make sure "Show items with no data" has been enabled.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If the date columns are from the date table (Dates in this example), you could add this to the end of your measure:
IF ( MONTH ( MAX ( Dates[Date] ) ) = 1, BLANK (), MeasureValueHere )
This assumes the Dates table has a relationship with the data table.
Proud to be a Super User!
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
86 | |
84 | |
83 | |
67 | |
49 |
User | Count |
---|---|
131 | |
111 | |
96 | |
71 | |
67 |