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.
Dearest community,
I'm sure there is a really simple way of doing this, but once again I can't seem to be figuring this out on my own:
I have a very simple table of Open orders by Customer:
Now I've displayed this in my PowerBI version already as I need it, but:
the date_archived are as they say dates representing the state of the open orders by customer on that very date it was archived. So instead of summarizing it, i displayed the status of every day by adding the "Date_archived" into the column fields of my table:
Now since i have a lot of dates and dont want to display all of them, I've additionally added a slicer with multi-selection for the end-user to compare (PLEASE NOTE HERE: I want these dates to be flexible to the user, so it's not always the last date in table versus one at random).
So one thing i was looking for was a measure i could put in place, that would show the change in Value between two selections, if that makes sense? To demonstrate, see encolored what I'd be interesed in (column D). Is there an easy way of doing this that i just can't seem to think of?
I've left a demo file alongside data table for your convenience here:
https://www.dropbox.com/scl/fo/i6oeb9mvrypo4bawjwov1/h?dl=0&rlkey=vgd213f2hh34sf6aki42s62l7
Thanks in advance!
As always, appreciate all of your efforts!
Best,
Alex
Solved! Go to Solution.
You can create a measure like
Diff =
VAR MinDate = CALCULATE( MIN( 'OpenOrders'[date_archived]), ALLSELECTED(OpenOrders[date_archived]) )
VAR MaxDate = CALCULATE( MAX('OpenOrders'[date_archived]), ALLSELECTED(OpenOrders[date_archived] ) )
VAR StartValue = CALCULATE(
[total Open Orders],
ALLEXCEPT(OpenOrders, OpenOrders[Customer]),
'OpenOrders'[date_archived] = MinDate
)
VAR EndValue = CALCULATE(
[total Open Orders],
ALLEXCEPT(OpenOrders, OpenOrders[Customer]),
'OpenOrders'[date_archived] = MaxDate
)
RETURN EndValue - StartValue
In order to get the matrix to display correctly you need to turn off word wrap for column headings and values and then set the width of the Diff column which appears under the first date to 0.
You can create a measure like
Diff =
VAR MinDate = CALCULATE( MIN( 'OpenOrders'[date_archived]), ALLSELECTED(OpenOrders[date_archived]) )
VAR MaxDate = CALCULATE( MAX('OpenOrders'[date_archived]), ALLSELECTED(OpenOrders[date_archived] ) )
VAR StartValue = CALCULATE(
[total Open Orders],
ALLEXCEPT(OpenOrders, OpenOrders[Customer]),
'OpenOrders'[date_archived] = MinDate
)
VAR EndValue = CALCULATE(
[total Open Orders],
ALLEXCEPT(OpenOrders, OpenOrders[Customer]),
'OpenOrders'[date_archived] = MaxDate
)
RETURN EndValue - StartValue
In order to get the matrix to display correctly you need to turn off word wrap for column headings and values and then set the width of the Diff column which appears under the first date to 0.
Wow, this works amazing!!! Thank you sooo so much for your help!
Best,
Alex
User | Count |
---|---|
81 | |
75 | |
70 | |
42 | |
36 |
User | Count |
---|---|
114 | |
56 | |
52 | |
43 | |
42 |