Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
i created a measure to count the total number of orders a customer did on the months, but i saw the total is wrong. I need help to correct this total (1+1+1+1+1+2+2 =9)
This is my measure
Thanks
Solved! Go to Solution.
I was close, but this will work:
.Measure1 =
SUMX( VALUES ( Calendario1),
CALCULATE(
IF (
MAX ( 'Calendario1'[Date] ) <= EOMONTH ( TODAY (), -13 ),
BLANK (),
IF (
ISBLANK ( DISTINCTCOUNT ( fOrder[K_NumberOrder] ) ),
0,
DISTINCTCOUNT ( fOrder[K_NumberOrder] )
)
)
)
)Without seeing the actual data, you need to add in SUMX( Values( Date[Month]) to your measure. Maybe something like this, but more of a guess:
.Measure1 =
IF (
MAX ( 'Calendario1'[Date] )
<= EOMONTH (
TODAY ();
-13
);
BLANK ();
IF (
ISBLANK (
DISTINCTCOUNT ( fOrder[K_NumberOrder] )
);
0;
SUMX ( VALUES ( Date[Month]);
DISTINCTCOUNT ( fOrder[K_NumberOrder] )
)
)
)
I was close, but this will work:
.Measure1 =
SUMX( VALUES ( Calendario1),
CALCULATE(
IF (
MAX ( 'Calendario1'[Date] ) <= EOMONTH ( TODAY (), -13 ),
BLANK (),
IF (
ISBLANK ( DISTINCTCOUNT ( fOrder[K_NumberOrder] ) ),
0,
DISTINCTCOUNT ( fOrder[K_NumberOrder] )
)
)
)
)Worked, thanks a lot @Anonymous
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 104 | |
| 81 | |
| 66 | |
| 50 | |
| 45 |