March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have created two seperate measures which are accumulating over the calendar.
Measure 1 is:
Measure 1 :=
VAR LastVisibleDate =
MAX ( 'Calendar'[CalendarDate] )
VAR Result =
CALCULATE (
Sum(‘Table1’[Value]),
FILTER (
ALL ( 'Table2'[Code] ),
'Table2'[Code] = "311"
),
'Calendar'[CalendarDate] <= LastVisibleDate
)
RETURN
Result
Measure 2 is similar but the filter code value is different.
Measure 3 = Measure 1 + Measure 2
This is what is shown below:
Day 2 | Day 3 | Day 4 | Day 5 | Total | |
Item 1 | -1 | 0 | 0 | 0 | 0 |
Item 2 | 0 | 0 | -1 | 1 | -1 |
Item 3 | 0 | 2 | -2 | -2 | -2 |
Now I need to count the number of days where Measure 3 is less than 0.
My DAX knowledge is not big enough to find out how to do this. I have though of creating temporary table for the valuation but am uncertain how to do this.
Solved! Go to Solution.
@JAB , Try a measure like
countx(values(Table[Item]) , if( [Measure 3] , [item], blank()))
or
countx(summarize(Table, Table[Item], Table[date],"_1" , [Measure 3]),if( [_1] , [item], blank()))
@JAB , Try a measure like
countx(values(Table[Item]) , if( [Measure 3] , [item], blank()))
or
countx(summarize(Table, Table[Item], Table[date],"_1" , [Measure 3]),if( [_1] , [item], blank()))
Hi amitchandak,
Thank you for your suggestion. I took the first suggestion and it worked just fine. Appreciate your help.
Kr
JAB
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
15 | |
12 | |
9 | |
8 |
User | Count |
---|---|
41 | |
32 | |
29 | |
12 | |
12 |