Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
aBerg
Helper II
Helper II

Days calculating error

Hi. 

 

I'm trying to make a calculation based on the difference between two dates (two days), but the result is not the one that is expected (in red), but shows as "infinite". 

It seems to me that the interval between days (Interval Days measure) despite being shown correctly on the card (30 days) for the calculation is considering as zero, so the result as "infinite". Smiley Frustrated

 

Could someone help me by pointing out a way to solve this error ? 

 

Greetings !

 

Days Calc.png

1 ACCEPTED SOLUTION
AlB
Super User
Super User

Hi @aBerg

 

Try this for your measure, placing it in the values of a matrix with Month and Day on rows as you show. Table1 is the table containing Month and Day columns shown in the matrix visual.

 

 

Calc Target =
SELECTEDVALUE ( Table1[Day] )
    * DIVIDE (
        CALCULATE ( COUNT ( Table1[Day] ) - 1, ALL ( Table1[Day] ) ),
        [BaseValue]
    )

 

Code formatted with   www.daxformatter.com

View solution in original post

11 REPLIES 11

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.