Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
From a column with the year, which today goes from 1980 to 2009 -although in the future it will start in 1960-, I have created two others with the decade, one of whole type, decada, (1980, 1990, 2000) and another of text type, decada_texto (80s, 90s, 00s). For the purposes of the problem that I am going to comment on below, it does not matter if I create them from Power Query or as calculated columns.
PowerBI orders decada_texto such that "00s -> 80s -> 90s", so I have ordered it according to decade, which being an integer does not suffer from this type of problems, so that the order is "80s -> 90s -> 00s".
Well, the problem is that doing this raises a problem with ALL(); if we count the number of different decades that exist and tell you not to take into account the filter context for the decada_texto itself:
decadas = CALCULATE(DISTINCTCOUNT(listas_spotify[decada_texto]), ALL(listas_spotify[decada_texto]))
Here's the result:
ALL() has no effect.
If you "disengage" decada_texto of a decade (note that the order is again "00s -> 80s -> 90s"):
ALL() is back to normal operation.
What way is there to solve this while maintaining the order I want?
Greetings and thanks in advance.
Solved! Go to Solution.
I think if you add a second ALL referring to your sort column it will fix it. The sort column is added into the filter context at the same time as the main column.
I think if you add a second ALL referring to your sort column it will fix it. The sort column is added into the filter context at the same time as the main column.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
76 | |
56 | |
38 | |
34 |
User | Count |
---|---|
99 | |
56 | |
51 | |
44 | |
40 |