The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
Solved! Go to Solution.
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.
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.
Hi v-kpoloju-msft,
Thanks for looking into this! I see now that the x-axis needed to stem from Dim_X.
@northcity4 You can write a cumulative measure for the tooltip but it won't display for values of x that don't exist I don't believe. You just add the measure to the Tooltips field well or you could create your own custom tooltip page. Might also try with x-axis being categorical or continuous.
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.