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 All,
I have one table report column Country and masure sales. I have included same country dimension in in page level filter pane. I want to show this report only when country is is selected from filter pane, otherwise should be blank. I tried with ISFILTERED but it's not working as Dimension is already in filter conetxt of this table visual. How can I achieve this?
Solved! Go to Solution.
Hi @rob_vander2 ,
According to your new requirement, you want to be able to filter multiple cities can also be displayed is it, you can try the following code, hope it can help you!
Display Sales @ =
IF(
CALCULATE(ISFILTERED('Countries_Table'[Country]),ALLSELECTED('Sales_Table')),
SUM('Sales_Table'[SalesAmount]),
BLANK()
)
Hope it helps!
Best regards,
Community Support Team_ Tom Shen
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi All,
Firstly Sahir_Maharaj thank you for your solution!
And @rob_vander2 ,Since in the screening process, if you do not select any city, the default logic is that you select all cities, so then in this case, we need to add a little restriction to ensure that the logic works properly.
Display Sales @ =
IF(
CALCULATE(HASONEVALUE('Countries_Table'[Country]),ALLSELECTED('Sales_Table')),
SUM('Sales_Table'[SalesAmount]),
BLANK()
)
If you have further questions, check out the pbix file I uploaded and I would be extremely proud if my solution solves your problem!
Hope it helps!
Best regards,
Community Support Team_ Tom Shen
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
@v-xingshen-msft Problem is I should be able to select multiple countries as well. In this case hasonevalue restricting to select only one country
Hi @rob_vander2 ,
According to your new requirement, you want to be able to filter multiple cities can also be displayed is it, you can try the following code, hope it can help you!
Display Sales @ =
IF(
CALCULATE(ISFILTERED('Countries_Table'[Country]),ALLSELECTED('Sales_Table')),
SUM('Sales_Table'[SalesAmount]),
BLANK()
)
Hope it helps!
Best regards,
Community Support Team_ Tom Shen
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
@Sahir_Maharaj Also, your solution doesn't seem to be working. When I put your DAX in the report, by default I can still see the report for all countries instead of blank
Hello @rob_vander2,
Thanks for your response.
Can you please try these updated approaches:
Show Report =
IF(
ISFILTERED('Country'[Country]),
[Sales Amount],
BLANK()
)
IF(
HASONEVALUE('Dim_country'[Country]),
[Sales Amount],
BLANK()
)
@Sahir_Maharaj Thanks for the reply. I have kind of got the solution with below DAX measure and it works. Could you tell me which one will be better?
if( COUNTROWS(ALLSELECTED('Dim_country'[Country])) < COUNTROWS(ALL('Dim_country'[Country])),
[Sales Amount],BLANK())
Hello @rob_vander2,
Can you please try this approach:
Show Report =
IF(
HASONEVALUE('Country'[Country]),
CALCULATE(
SUM('SalesTable'[Sales]),
FILTER(
ALL('Country'),
'Country'[Country] IN VALUES('Country'[Country])
)
),
BLANK()
)
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 |
---|---|
13 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
20 | |
14 | |
11 | |
10 | |
10 |