cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sean Super Contributor
Super Contributor

Re: ALLEXCEPT - my trojan friend

Okay so have you solved the problem then?

Are you trying now to get the ratio to extend to 2010?

Vvelarde Super Contributor
Super Contributor

Re: ALLEXCEPT - my trojan friend

@craasp

 

hi, are you expected this result?

 

result.png




Lima - Peru
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




craasp Frequent Visitor
Frequent Visitor

Re: ALLEXCEPT - my trojan friend

Hi, sorry if i kept you waiting..

@tringuyenminh92 some how like in your picture, in reagard to the case that allApples stay while selected Apples = 0. But in my case, the interaction of the slicer of Years is only used for other visualisation on the same page. allApples should be displayed in every year! The interaction are set right.

@Vvelarde, yes, that should look like that.

 

Two scenarios:

1. I use the Years[Year] data as x-Axis

 

A: For NEWallApples (=Calculate(sum(Apples[Amount];Apples[Color]<>"yellow";ALL(Apples[Size]))):

The column for respective years stay in case that selectedAppes = 0

but a unpleasant flaw: if I higlight a color (in the real case a country on a map, !not in the legend of the map! (it works with other visualisation e.g. piechart), then the highlighted area/amount equals the highlighted amount of selectedApples

 

B: For TRIallApples (= Calculate(sum(Apples[Amount]);Filter(Allexcept(Apples;Apples[Size]);Apples[Color]<>"yellow")))

The column for respective years stay in case that selectedAppes = 0

but: it sums all apples for the whole range of years

pro: the flaw of A seems to happen

 

2. I use Apples[Year] data as x-Axis:

 

2. Scenario:

For A&B: in the case of selectedApples = 0 --> no column in that year

 

Picture shows scenario 1

Bildschirmfoto 2017-01-25 um 13.13.07.png

 

 

 

 

Hope the problem is understandable.. 

I would just go with scenario 1 A, but I also would like to understand wyh I cant use ALLEXCEPT + this unfortunate flaw bothers me..

 

Best regards and thanks in advance,

Caspar

 

Vvelarde Super Contributor
Super Contributor

Re: ALLEXCEPT - my trojan friend

@craasp

 

Hi, to obtain this chart (in a preview Post) i modified the measure to this:

 

AllApples =
CALCULATE (
    SUM ( Apples[Amount] ),
    ALLEXCEPT ( Apples, Years[Year] ),
    Apples[Color] <> "yellow"
)

 




Lima - Peru
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




craasp Frequent Visitor
Frequent Visitor

Re: ALLEXCEPT - my trojan friend

Thank you very much for your replies, @Vvelarde and @tringuyenminh92. I think that will do it. Still, while it works for the small example, in my real project the "allApples" columns disappear when no "selectedApples" are shown for any year. Although I wonder why it differs, the solution is close enough to what I was looking for.

I hope I wont stumble into more problems with that.

For now, again THANKS

 

ps: I mark @Vvelardes reply as solution, although @tringuyenminh92 mentioned the idea with the years table first, because it shows the solution in most condensed way. 

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 40 members 1,012 guests
Please welcome our newest community members: