Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Max results in infinity

Hi I am trying to create the max value for my dataset, my DAX calc results in "Infinity". 

I have created a measure to determine the Density of my dataset for each "Entry": 

Density = CALCULATE(SUM(Sheet1[Count]), Sheet1[Type] <> "Logged")/CALCULATE(SUM(Sheet1[Count]), Sheet1[Type] = "Logged")
 
I then need the max for this as well, for which I tried this calc: MaxDensity = MAXX(ALL(Sheet1),[Density]


The MaxDensity should be 26.01 for all the Entry values, any ideas? 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous 

    You can try the following measure

    MaxDensity =
    VAR a =
        SUMMARIZE ( ALLSELECTED ( Sheet1 ), [Entry], "Density", [Density] )
    RETURN
        MAXX ( a, [Density] )
    

    Best Regards!

    Yolo Zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

3 Replies

  • Hello Anonymous ,

    Is there any possibility that you can share the pbix file to look at the error. 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Kishore, thanks, I have originally attempted this - I have the PBIX file ready but I cannot see how to upload it to this post, any ideas?

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Anonymous 

        You can try the following measure

        MaxDensity =
        VAR a =
            SUMMARIZE ( ALLSELECTED ( Sheet1 ), [Entry], "Density", [Density] )
        RETURN
            MAXX ( a, [Density] )
        

        Best Regards!

        Yolo Zhu

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.