Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi there,
I ve got a problem with measure dax. I cannot sum in group from measure which I ve created.
First I create a calculated column
then I created a measure as below
See if this works:
earned_day =
SUMX (
VALUES ( 'Date'[Year] ),
DIVIDE (
CALCULATE (
COUNTROWS ( 'Date' ),
FILTER (
ALL ( 'Date' ),
'Date'[Date] >= MIN ( UW[Hieuluc Tu] )
&& 'Date'[Date] <= MIN ( UW[Hieuluc Den] )
)
),
VAR MinTotalDay =
MIN ( UW[totalday] )
RETURN
IF ( MinTotalDay = 0, 1, MinTotalDay )
)
)The reason for infinity error is because at the denominator there is 0 for 2020 so you will have to check for the 0.
Thanks for your reply
Your dax can fix the infinity problem but it still doesnt correct the total of row. I need to calculate the total by year. I cannot use sum function for a measure. The first measure just calculate for each row and I dont know how I can aggregrate for a group.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 8 | |
| 8 |