Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi everyone,
Hope you guys fine and safe.
Here is my thing, I want a dynamic total sum based on two dimensions (Continent and Country).
What I want is when I switch dimensions it gives me the total sum of the selected dimension.
For now I know how to do it but not dynamically :
Solved! Go to Solution.
Thanks @amitchandak
Here is the thing, when I am at a continent level granularity I want the total sum of all continent like this below:
and when I am at a country level I want the sum to perform like this :
Hope this make it clear enough,
Thanks a lot for your time
Hi @Anonymous ,
Try this:
Dynamic Total sales =
SWITCH (
TRUE (),
ISFILTERED ( 'Requête1'[Country] ),
CALCULATE (
SUM ( 'Requête1'[Sales] ),
ALLEXCEPT ( 'Requête1', 'Requête1'[Continent] )
),
ISFILTERED ( 'Requête1'[Continent] ), CALCULATE ( SUM ( 'Requête1'[Sales] ), ALL ( 'Requête1'[Country] ) )
)
Best regards
Icey
If this post helps, then consider Accepting it as the solution to help other members find it faster.
Thanks @amitchandak
Here is the thing, when I am at a continent level granularity I want the total sum of all continent like this below:
and when I am at a country level I want the sum to perform like this :
Hope this make it clear enough,
Thanks a lot for your time
Hi @Anonymous ,
Try this:
Dynamic Total sales =
SWITCH (
TRUE (),
ISFILTERED ( 'Requête1'[Country] ),
CALCULATE (
SUM ( 'Requête1'[Sales] ),
ALLEXCEPT ( 'Requête1', 'Requête1'[Continent] )
),
ISFILTERED ( 'Requête1'[Continent] ), CALCULATE ( SUM ( 'Requête1'[Sales] ), ALL ( 'Requête1'[Country] ) )
)
Best regards
Icey
If this post helps, then consider Accepting it as the solution to help other members find it faster.
@Anonymous , Not very clear. If you want a Grand total by any of these. Unless there is null value all(Sales), all(Country), or all(Continent) will give same value
If you want to change axis. Refer to :
Dynamically change chart axis in Power BI
https://www.youtube.com/watch?v=6jeSIRpjv0M
https://datamonkeysite.com/2020/10/22/change-dimension-dynamically-using-parameter-in-powerbi/
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
67 | |
65 | |
56 | |
39 | |
27 |
User | Count |
---|---|
85 | |
59 | |
45 | |
43 | |
38 |