Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a measure which shows which months have been selected from a slicer
The below syntax works, but ignores my FORMAT argument, therefore if I select Jan and Feb 2021 from my slicer (called Reporting Period), the FILTER measure displays "REPORTING MONTHS: 01/01/2021 | 01/02/2021"
FILTER = IF(ISFILTERED('Dim_Date'[REPORTING PERIOD]), "REPORTING MONTHS: "& UPPER(FORMAT(CONCATENATEX(VALUES('Dim_Date'[REPORTING PERIOD]),'Dim_Date'[REPORTING PERIOD]," | "),"MMM YYYY")))
What I want to appear is "REPORTING MONTHS: JAN 2021 | FEB 2021"
Is this possible within this type of measure?
Solved! Go to Solution.
@Anonymous - The FORMAT is outside of the CONCATENATEX so it will not be recognised as DATE. You might be able to try something like:
FILTER =
VAR _RepMths =
DISTINCT(
SELECTCOLUMNS(
'Dim_Date' ,
"Formatted Reporting Months" ,
FORMAT( 'Dim_Date'[REPORTING PERIOD], "MMM YYYY")
)
)
RETURN
IF(
ISFILTERED('Dim_Date'[REPORTING PERIOD]),
"REPORTING MONTHS: "& UPPER( CONCATENATEX( _RepMths , [Formatted Reporting Months] ," | ") ),
BLANK()
)
@Anonymous - The FORMAT is outside of the CONCATENATEX so it will not be recognised as DATE. You might be able to try something like:
FILTER =
VAR _RepMths =
DISTINCT(
SELECTCOLUMNS(
'Dim_Date' ,
"Formatted Reporting Months" ,
FORMAT( 'Dim_Date'[REPORTING PERIOD], "MMM YYYY")
)
)
RETURN
IF(
ISFILTERED('Dim_Date'[REPORTING PERIOD]),
"REPORTING MONTHS: "& UPPER( CONCATENATEX( _RepMths , [Formatted Reporting Months] ," | ") ),
BLANK()
)
Thanks you clever little sausage! It worked perfectly! Didn't occur to be to create a variable. Great 😄
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
99 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |