Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I would like to create a new measure with some value like this:
IF Before today:
CALCULATE(
SUM('DataMart'[ACTUAL]),
FILTER(
ALLSELECTED('DIM_DATE'[DAY_DATE]),
ISONORAFTER('DIM_DATE'[DAY_DATE], max(DIM_DATE[DAY_DATE]), DESC)))
If it After today: 0
Any suggestions?
Solved! Go to Solution.
@cathyPB - Does this measure work?:
Your Measure 2 =
var _Date_As_Of = MAX('Dim_Date'[Day_Date])
return CALCULATE(
SUM('DataMart'[ACTUAL]),
FILTER(
ALL('Dim_Date'),
AND(_Date_As_Of < TODAY(), 'Dim_Date'[Day_Date] <= _Date_As_Of)
)
)
@cathyPB - Could you please clarify: are you wanting to compare the fact table date vs today's date and return 0 if it's in the future?
Yes, I do have Date dimension as well.
@cathyPB - Check whether this Measure works:
Your Measure =
CALCULATE(
SUM('DataMart'[ACTUAL]),
FILTER(
'Dim_Date',
'Dim_Date'[Day_Date] < TODAY()
)
)
Thanks for reply, but I would like to get accumulative sum result as following:
CALCULATE(
SUM('DataMart'[ACTUAL]),
FILTER(
ALLSELECTED('DIM_DATE'[DAY_DATE]),
ISONORAFTER('DIM_DATE'[DAY_DATE], max(DIM_DATE[DAY_DATE]), DESC)))
@cathyPB - Does this measure work?:
Your Measure 2 =
var _Date_As_Of = MAX('Dim_Date'[Day_Date])
return CALCULATE(
SUM('DataMart'[ACTUAL]),
FILTER(
ALL('Dim_Date'),
AND(_Date_As_Of < TODAY(), 'Dim_Date'[Day_Date] <= _Date_As_Of)
)
)
Hello,
I am also having a similar issue. I am looking to do something like this. IF week = 1 and timesheet issue = missing then missing if week = 1 and timesheet = good then sum actual hours. I want the results to populate in the same column. Any suggestions?
@Anonymous - Please post a new thread, and refer to this blog post for guidance.
Not yet, it only return one value as the point in the chart
@cathyPB - Could you please mock up what you are looking for and provide a screenshot of what is currently happening?
@Anonymous It works. The dot comes from the higher level, so drill down to lower level does work.Thanks.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 48 | |
| 40 | |
| 40 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 26 |