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.
Meter 1 Consumption =
VAR ConsumptionToday =
CALCULATE(SUM(ConsumptionDaily[QC Meter 1]))
VAR ConsumptionPriorDay =
CALCULATE(SUM(ConsumptionDaily[QC Meter 1]), PREVIOUSDAY('ConsumptionDaily'[Date]))
VAR DIFF =
ConsumptionToday - ConsumptionPriorDay
RETURN
IF(ISBLANK(ConsumptionPriorDay),BLANK(),IF(DIFF<0,DIFF+9999999,DIFF))
You should use the effect of a telescopic sum here.
Instead of summing over all of the daily consumptions, just calculate the difference between first consumption and last consumption within the time, using your logic:
Meter 1 Consumption =
VAR MaxDate = MAXX(Datecolumn)
VAR MinDate = MINX(Datecolumn)
VAR ConsumptionEnd =
CALCULATE(SUM(ConsumptionDaily[QC Meter 1]), date = MaxDate)
VAR ConsumptionStart =
CALCULATE(SUM(ConsumptionDaily[QC Meter 1]), Datecolumn = MinDate)
VAR DIFF =
ConsumptionEnd - ConsumptionStart
RETURN
IF(ISBLANK(ConsumptionStart),BLANK(),IF(DIFF<0,DIFF+9999999,DIFF))
Might need to substract one day from MinDate.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
17 | |
10 | |
10 | |
8 | |
6 |
User | Count |
---|---|
17 | |
15 | |
15 | |
12 | |
10 |