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.
I have a data table with a date and text column. there are multiple rows for the same date. I want to display the rows in a table visual filtered on date. this works well, but I also want to have a "default" filter if no filter on date column is set.
For that i would need to create a measure which uses IF(ISFILTERED(date...), ...) but measures need to return 1 row instead of multiple.
What is the solution in such a case?
Solved! Go to Solution.
Hi @sjelting ,
Please try:
Measure =
IF (
NOT ISFILTERED ( 'Table'[Column1] ),
IF (
MAX ( 'Table'[Column2] ) IN { "c", "d" },
MAX ( 'Table'[Column1] ),
BLANK ()
),
IF ( ISFILTERED ( 'Table'[Column1] ), MAX ( 'Table'[Column1] ) )
)
The final visual effect is shown below:
pbix file is attached.
If you have any further questions please feel free to contact me.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Hi @sjelting ,
Thanks for the reply from @Sahir_Maharaj .
I am a little vague about your needs. You mentioned "IF(ISFILTERED(date...), ...)". What do you want to return if the result is TRUE? FalseWhat do you want to return?
You mentioned having multiple rows for the same date, but the measure needs to return 1 row instead of multiple rows. What is the row that needs to be returned?
I would be grateful if you could provide me with your expected results.
I would be grateful if you could provide me with sample data for testing, please remove any sensitive data in advance.
If you have any further questions please feel free to contact me.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
i cant upload a sample pbix , so i will add a screenshot:
Hi @sjelting ,
Please try:
Measure =
IF (
NOT ISFILTERED ( 'Table'[Column1] ),
IF (
MAX ( 'Table'[Column2] ) IN { "c", "d" },
MAX ( 'Table'[Column1] ),
BLANK ()
),
IF ( ISFILTERED ( 'Table'[Column1] ), MAX ( 'Table'[Column1] ) )
)
The final visual effect is shown below:
pbix file is attached.
If you have any further questions please feel free to contact me.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
This measure uses the values hard coded., but they change over time, so that is no solution
this wont work as it shows only one line if a filter is set even though there might be multiple rows and only the default text if its not set.
Hello @sjelting,
Can you please try this:
Is Date Filtered = IF(ISFILTERED(TableName[Date]), "Filtered", "Not Filtered")
Display Text =
VAR isFiltered = [Is Date Filtered]
RETURN
IF(
isFiltered = "Filtered",
MAX(TableName[TextColumn]),
"Default Text"
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
15 | |
11 | |
8 | |
8 | |
8 |
User | Count |
---|---|
23 | |
13 | |
11 | |
10 | |
10 |