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 September 15. Request your voucher.
Hello !
I would like to get the value against latest/last month of a quarter if "Quarter filter" alone is selected. If both Quarter and Month filters are selected then give the value for selected month. If multiple values are selected in month( say jan and may) return value for May. Similarly if multiple Quarters are selected, then the last month of the latest quarter. (say if Q1 and Q2, the return for June unless any other month is selected explicitly)
Any help is appreciated.
Thanks alot for your time!
Solved! Go to Solution.
Hi @abhirami_rs091 ,
Lets assume you have a Date table with columns Date[Quarter], Date[Month] (the abbreviated month name) and Date[Month Order] (a column to sort column Date[Month] chronologically) and a measure called [Value] that you want to calculate for the selected period.
Then a measure could look like this
Selected Period Calculation =
IF (
ISFILTERED ( Date[Month] ),
VAR _ShowMonth = MAX(Date[Month Order])
RETURN
CALCULATE (
[Value],
Date[Month Order] = _ShowMonth
),
VAR _ShowQuarter = MAX(Date[Quarter])
RETURN
CALCULATE (
[Value],
Date[Quarter] = _ShowQuarter
)
)
Kind regards,
Martin
Hi @abhirami_rs091 ,
Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.
If these also don't help, please share more detailed information and description to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
Hi @abhirami_rs091 ,
Lets assume you have a Date table with columns Date[Quarter], Date[Month] (the abbreviated month name) and Date[Month Order] (a column to sort column Date[Month] chronologically) and a measure called [Value] that you want to calculate for the selected period.
Then a measure could look like this
Selected Period Calculation =
IF (
ISFILTERED ( Date[Month] ),
VAR _ShowMonth = MAX(Date[Month Order])
RETURN
CALCULATE (
[Value],
Date[Month Order] = _ShowMonth
),
VAR _ShowQuarter = MAX(Date[Quarter])
RETURN
CALCULATE (
[Value],
Date[Quarter] = _ShowQuarter
)
)
Kind regards,
Martin
User | Count |
---|---|
14 | |
12 | |
7 | |
6 | |
5 |
User | Count |
---|---|
28 | |
18 | |
13 | |
7 | |
5 |