Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I have a parameters page where the user select on a slicer, the YEAR and MONTH to filter data; sometimes that selection can handle more than one month for the same year or event different months on different years.
>>> Is there a DAX for catch the filtered date interval and then show it on a CARD on the HOME-PAGE?
Solved! Go to Solution.
Ideally you should be working with a calendar table. Even if you aren't, include a field for "Month-Year" using the following code:
Month - Year = FORMAT([Date], "MMM") & "-" & YEAR([Date]))
Next create a measure along the lines of:
Selected Periods =
IF (
ISFILTERED ( 'Calendar Table' ),
CONCATENATEX (
VALUES ( 'Calendar Table'[Month - Year] ),
'Calendar Table'[Month - Year],
", "
),
"No Period Selected"
)
To get...
Proud to be a Super User!
Paul on Linkedin.
😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲
Hi @PaulDBrown,
tks for quick-reply, it seems exactly I need.
I´ll test in a few hours here in a LAB environment and also on the production and then ping back here.
Ideally you should be working with a calendar table. Even if you aren't, include a field for "Month-Year" using the following code:
Month - Year = FORMAT([Date], "MMM") & "-" & YEAR([Date]))
Next create a measure along the lines of:
Selected Periods =
IF (
ISFILTERED ( 'Calendar Table' ),
CONCATENATEX (
VALUES ( 'Calendar Table'[Month - Year] ),
'Calendar Table'[Month - Year],
", "
),
"No Period Selected"
)
To get...
Proud to be a Super User!
Paul on Linkedin.
Hi,
I need help,
I have a situation here where I need to show multiple values selected from multiple sicers in a card visual.
multiple values of same slicer should be seperated by ","and multiple values from multiple slicers should be seperated by "|".
for example, if i select INDIA and USA from country slicer, result is INDIA,USA
if i select INDIA and USA from country slicer and 2021,2022 from year slicer ,result is INDIA,USA |2021,2022
if no values selected from any slicer, result is "Not selected".
thanks in advance...
Try:
Selection =
VAR _Country =
IF (
ISFILTERED ( 'Country Slicer'[Country] ),
CONCATENATEX (
VALUES ( 'Country Slicer'[Country] ),
'Country Slicer'[Country],
", "
)
)
VAR _Year =
IF (
ISFILTERED ( 'Year Slicer'[Year] ),
CONCATENATEX ( VALUES ( 'Year Slicer'[Year] ), 'Year Slicer'[Year], ", " )
)
RETURN
_Country & " | " & _Year
Proud to be a Super User!
Paul on Linkedin.
Hi Paul,
Thank you so much for the quickest response, here when I select multiple values from single slicer, it's showing pipe symbol,it just need to show only the values selected seperated by comma, it should not display the pipe symbol as there is no selection from other slicer and when no slicer values selected, it should display "Not Selected"
In that case, try:
Selection =
VAR _Country =
IF (
ISFILTERED ( 'Country slicer'[Country] ),
"Countries: "
& CONCATENATEX (
VALUES ( 'Country slicer'[Country] ),
'Country slicer'[Country],
", "
),
"No countries selected"
)
VAR _Year =
IF (
ISFILTERED ( 'Year Slicer'[Year] ),
CONCATENATEX ( VALUES ( 'Year Slicer'[Year] ), 'Year Slicer'[Year], ", " ),
"No years selected"
)
RETURN
_Country & " | " & _Year
Proud to be a Super User!
Paul on Linkedin.
Hi Paul,
Thank you for the response ,means a lot.
I couldn't convey to you properly what I need to show on the card, please look into the below scenarios.
I have 3 slicers here, Year,LocID,CourseID
for example, if I select 2017 and 2018 from Year slicer,
The result should be : 2017,2018 (here "|" is not expecting after the result)
if I select "HYD" and "BZA" from LocID slicer and 2021,2022 from year slicer and "Azure-C","Azure-F" from CourseID,
result is: HYD,BZA | 2021,2022 |Azure-C,Azure-F
If I select no values from three slicers,
Result is: Not Selected (only when all three are not selected)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
145 | |
85 | |
66 | |
52 | |
48 |
User | Count |
---|---|
215 | |
90 | |
83 | |
67 | |
59 |