March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello All,
I'm using Matrix visual,
where Sub Category and Product are in Rows
Country is in Columns
and Sales as my Values.
Assume one of country selection is fixed(Ex : In my scenario it is "Canada",if any product in Candada country has no sales and other country has sales for that product , My requirement is I don't want to show that product in my visualization).
I'm attaching a snap for reference
In the above snap I don't want to show sales for the product "Road-250 Red, 58" and this scenario applies only w.r.to Canada(If any product in Canada has NO Sales).
I tried the below but it's not giving the expected result
How to achieve this?
TIA
Solved! Go to Solution.
I made a change to the measure supplied by @DataNinja777 .
Sales Canada =
SUMX(
'Geography',
IF(
CALCULATE(
[Sales],
KEEPFILTERS( 'Geography'[CountryRegionName] = "Canada" )
) <> BLANK(),
1
)
)
I used this to filter the visual.
Like-For-Like Canadian Sales.pbix
Let me know if you have any questions.
(Sorry. I used DimGeography instead of DimSalesTerritory.)
Hi @gmsamborn , @DataNinja777
Your solution helped me but I have extended requirement.
Assume I have a column with status "Competitive(if product contains Yellow name in it) and Non-Competitive(Except Yellow name in it)".I want to show sales for products for Competitive at least level granularity(Which is Product),But at Sub category and Category Level I want to show total for both Competitive and Non-Competitive.
I used this DAX to achieve the result which is
But I want to see other Sub category and category sales.
Help me out on this.
TIA
I'm a little unclear regarding your requirements.
Using AdventureWorksDW, can you create a pbix that reflects your requirements?
Hi @gmsamborn
I'm attaching the reference pic and pbix file.
Let's assume I did grouping if Product Name contains "Yellow" in it I'm grouping it as "Competitive" or else "Non-Competitive"(created a column in pbix file as Grouping)
At product level my sales should be only for the Product which the name has Yellow in it or else don't show sales at product Level but show the Sales at Sub category and Category Level(for both Competitive and Non - Competitive). Attaching snap for Reference.
I'm able to achieve the above requirment with the following DAX
I see your problem. The 'Like-For-Like' calculation overrides the 'Competitive/Non-competitive' calculation. When I wrote the 'Like-For-Like' calculation, there was no other requirements.
I have a page called 'Compare' which shows the effect of the 'Like-For-Like' calculation.
I'm not sure what else I can do at this point. (I'll take another look.)
Hi @gmsamborn ..Thanks for the reply.Is there any other way which won't override 'Competitive/Non-competitive' calculation when we apply Sales canada Visual Level Filter
One question..., I am curious why thousand comma separators are in such unusual location. I tried to convert the picture to a table using Power Query, but some of the numbres weren't getting recognized as numbers due to strange location of thousand comma separator.
Regarding your required output, I think you can achieve it by something like below:
Best regards,
Hello @DataNinja777
Thanks for the reply ,but I want other countries also in my table.
My requirement is If there's no sales for a Product in CANADA means remove that product sales from other countries also.
I made a change to the measure supplied by @DataNinja777 .
Sales Canada =
SUMX(
'Geography',
IF(
CALCULATE(
[Sales],
KEEPFILTERS( 'Geography'[CountryRegionName] = "Canada" )
) <> BLANK(),
1
)
)
I used this to filter the visual.
Like-For-Like Canadian Sales.pbix
Let me know if you have any questions.
(Sorry. I used DimGeography instead of DimSalesTerritory.)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
91 | |
89 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
72 | |
68 |