March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello,
I have this bar graph. My question is if someone clicks on the graph to say January then I want to show 1, if it is CTRL and they chose any 2 months then I want to show 2, if I don't select anything then 12 (if it is not current year) and the total number of months if it is current year. ( I am not talking about EDIT INTERACTIONS).
With slicers it's easy, but I want to show number of months when someone clicks on the graph. These are getting used in my other formulas so this number of month will become denominator in bigger formula.
This is a return for my formula which works fine except it sums all the stores so I want to add Month measure and divide it by that based on the month selected.
Solved! Go to Solution.
@bathbath , Your measure will filter data from the table and related table on one side. Assuming a date table is used and use filtered it will remove data
Assume you have a measure, M1. This code will show a selected range or 12 months range
new measure =
var _max = maxx(allselected(Date),Date[Date])
var _min = eomonth(_max , -12) +1
var _fil = calculate(isfiltered('Date'), allselected('Date'))
return if(_fil, [M1],
calculate( [M1], filter('Date', 'Date'[Date] <=_max && 'Date'[Date] > _min)) )
@bathbath , Your measure will filter data from the table and related table on one side. Assuming a date table is used and use filtered it will remove data
Assume you have a measure, M1. This code will show a selected range or 12 months range
new measure =
var _max = maxx(allselected(Date),Date[Date])
var _min = eomonth(_max , -12) +1
var _fil = calculate(isfiltered('Date'), allselected('Date'))
return if(_fil, [M1],
calculate( [M1], filter('Date', 'Date'[Date] <=_max && 'Date'[Date] > _min)) )
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |