Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
18 | |
15 | |
11 | |
11 | |
8 |
User | Count |
---|---|
24 | |
18 | |
12 | |
11 | |
10 |