Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Based on the client requirement, created measure to show last three months data based on slicer selection, now we need to show the monthenddate in the tool tip for all the month which data as been shown.
Date sort 3months =
var mindate = Date(Year(calendar(Monthenddate),Month(calendar(Monthenddate)-2,Day(calendar(Monthenddate)))
var Result = if(Max(Monthenddate) < mindate,blank(), max(Monthenddate))
Return Result
By using above measure, we can achieve only latest month date in tool tip, but i want for previous 2 month also.
Example: if I select Jan 2023 in slicer, in visual it shows Nov, Dec and Jan data. So, we need achieve as menctioned above.
Can anyone help me in this?
Thanks in advance!
Hi @Shrujan1612 ,
It would help if you can provide a sample data and the result you are expecxting. From what I can understand, try the below code
var mindate = Date(Year(calendar(Monthenddate),Month(calendar(Monthenddate)-2,Day(calendar(Monthenddate)))
var Result_curr = if(Max(Monthenddate) < mindate,blank(), max(Monthenddate))
var Result_curr-1 = DATEADD ([Result_curr], -1, MONTH)
var Result_curr-2 = DATEADD ([Result_curr], -2, MONTH)
Return Result_curr & "-" & Result_curr-1 & "-" & Result_curr-2
or create a tooltip page and use a table in to display.
Hope it resolves your issue? Did I answer your question? Mark my post as a solution! Appreciate your Kudos, Press the thumbs up button!! Linkedin Profile |
It didn't work, when i hover on bar particular month date should be shown in tool tip for all three months
This will return a string of 3 dates separated by ";". The first date is the latest 3rd month end date, the second date is the latest 2nd month end date, and the third date is the latest month end date. You can then use this string in the tool tip to display the month end dates.
Let me know if you require further assistance.
Hello @Shrujan1612,
You can modify the measure as follows to show the latest 3 month end dates in the tool tip:
var mindate = Date(Year(calendar(Monthenddate)), Month(calendar(Monthenddate))-2, Day(calendar(Monthenddate)))
var maxdate = max(Monthenddate)
var mindate2 = Date(Year(calendar(mindate)), Month(calendar(mindate))-1, Day(calendar(mindate)))
var maxdate2 = if(maxdate >= mindate2, mindate2, BLANK())
var mindate3 = Date(Year(calendar(mindate2)), Month(calendar(mindate2))-1, Day(calendar(mindate2)))
var maxdate3 = if(maxdate2 >= mindate3, mindate3, BLANK())
Return Concatenate(maxdate3, ";", maxdate2, ";", maxdate)
It didn't work, when i hover on bar particular month date should be shown in tool tip for all three months
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
Check out the May 2024 Power BI update to learn about new features.
User | Count |
---|---|
90 | |
80 | |
61 | |
60 | |
58 |
User | Count |
---|---|
155 | |
119 | |
103 | |
77 | |
71 |