Forum Discussion

northcity4's avatar
northcity4
New Member
1 year ago
Solved

Generate Cumulative Count Tooltips over missing inputs

Kindly let me know if this question is outside of PowerBI's technical capabilities.

Goal: Have PowerBI's Tooltip show the value on a line chart, even for areas where the x-value may not exist.

Here is a version of a cumulative count function I created:

Cumulative Count = CALCULATE(SUM(Table[cnt_flag]),ALLSELECTED(Table[x_value]),ISONORAFTER(Table[x_value], MAX(Table[x_value]),DESC))

Depending on how many filters I use, there could be several areas where the x-value does not exist but the line still shows. For instance, below the tooltip shows values at x=16 & 18 but not x=17 since all instances of x=17 have been filtered out.

Is there a way to modify my measure so that the tooltip could show something over 17?

 

- I have tried using calculated tables, but I would like to avoid this as these are static. The chart needs to adapt based on the filters chosen.

- Dummy rows would solve my problem, but the number of filters I have puts me at memory limits when attempting this.

  • Hi northcity4

    Thank you for reaching out to the Microsoft fabric community forum. Also thanks Greg_Deckler, for his inputs on this thread. I reproduced the scenario, and it worked on my end. I used my sample data and successfully implemented it.

    Dax Measure for Cumulative Count:

    Cumulative Count =
    
    VAR CurrentX = SELECTEDVALUE('Dim_X'[Value])
    
    RETURN
    
    CALCULATE(
    
        SUM('fact_events'[cnt_flag]),
    
        FILTER(
    
            ALLSELECTED('fact_events'),
    
            'fact_events'[x_value] <= CurrentX
    
        )
    
    )


    Outcome:

    I am also including .pbix file for your better understanding, please have a look into it:

    Hope this helps clarify things and let me know what you find after giving these steps a try happy to help you investigate this further.

    Thank you for using the Microsoft Community Forum.

4 Replies

    • northcity4's avatar
      northcity4
      New Member

      Thanks for taking a look! The link was quite interesting to review, but I think the suggestions there and your other options did not get me the result I was hoping for. Perhaps they can add an "interpolation" option in a future update to have more display options and display functionality for areas with missing data, such as the built-in tooltip mechanic.

  • v-kpoloju-msft's avatar
    v-kpoloju-msft
    Community Support

    Hi northcity4

    Thank you for reaching out to the Microsoft fabric community forum. Also thanks Greg_Deckler, for his inputs on this thread. I reproduced the scenario, and it worked on my end. I used my sample data and successfully implemented it.

    Dax Measure for Cumulative Count:

    Cumulative Count =
    
    VAR CurrentX = SELECTEDVALUE('Dim_X'[Value])
    
    RETURN
    
    CALCULATE(
    
        SUM('fact_events'[cnt_flag]),
    
        FILTER(
    
            ALLSELECTED('fact_events'),
    
            'fact_events'[x_value] <= CurrentX
    
        )
    
    )


    Outcome:

    I am also including .pbix file for your better understanding, please have a look into it:

    Hope this helps clarify things and let me know what you find after giving these steps a try happy to help you investigate this further.

    Thank you for using the Microsoft Community Forum.

    • northcity4's avatar
      northcity4
      New Member

      Hi v-kpoloju-msft,

       

      Thanks for looking into this! I see now that the x-axis needed to stem from Dim_X.