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 am struggling with the following problem: I have two tables representing listing of items at two different timeframes (Year 1 and Year 2). Every item is unique and represented by a serial number [ID] column and a location (the country is the column [Geo]).
Each table have ID and Geo columns, but the two tables have different number of rows as some items have been added and some have been removed.
The aim of my analisys is to trace (keeping the possibility to drill down the data to the "history" of the single ID):
1. Changes in the "fleet": number of IDs added in Year 2, number of ID removed in Year 2, number of ID present in both years;
2. Changes in the location of the IDs that are present in both years (if any), locations where new items (year 2) have been introduced, locations where items have been retired.
Furthermore, I have to represent those information with a chart - I was thinking at chord chart, but should you have any suggestion I am very open to them!
Many thanks!
Solved! Go to Solution.
Hi @giogio ,
You could merge these two tables with "full outer" mode.
Then use three measures to get the results.
FLOWS =
VAR a =
SELECTEDVALUE ( Merge1[FROM] )
VAR b =
SELECTEDVALUE ( Merge1[TO] )
RETURN
IF (
a <> BLANK (),
IF ( b = BLANK (), "RETIREMENTS", IF ( a = b, "SAME", "CHANGE" ) ),
"NEW"
)
# =
CALCULATE (
COUNT ( Merge1[Custom] ),
ALLEXCEPT ( Merge1, Merge1[FROM], Merge1[TO] )
)
DETAIL =
CONCATENATEX(Merge1,Merge1[Custom],",")
Here is my test file for your reference.
Hi @giogio ,
You could merge these two tables with "full outer" mode.
Then use three measures to get the results.
FLOWS =
VAR a =
SELECTEDVALUE ( Merge1[FROM] )
VAR b =
SELECTEDVALUE ( Merge1[TO] )
RETURN
IF (
a <> BLANK (),
IF ( b = BLANK (), "RETIREMENTS", IF ( a = b, "SAME", "CHANGE" ) ),
"NEW"
)
# =
CALCULATE (
COUNT ( Merge1[Custom] ),
ALLEXCEPT ( Merge1, Merge1[FROM], Merge1[TO] )
)
DETAIL =
CONCATENATEX(Merge1,Merge1[Custom],",")
Here is my test file for your reference.
Thank you very much @v-eachen-msft !
As the tables contained much more information I also used some conditional formatting column iterations in the edit queries tab with great results!
Question on this: is there something similar but more flexible than chords visuals? It's fine but maybe you have in mind something more useful to show these data in a visual form.
Thanks again!
Hi @giogio ,
Could you please share your sample data and excepted result to me if you don't have any confidential Information. Please upload your files to One Drive and share the link here.
@v-eachen-msft thank you for your interest!
Unfortunately my dataset is confidential, but I created an easy example (which much less entries) to better explain my problem.
I have two tables, let's call them Year1 and Year2 made of 2 columns each (ID and Location). ID represent a unique element that may be present in Year 1, Year 2 or both. The example dataset is in the picture below:
My goal is to compare the two tables highlighting the dynamics happened from year 1 to year 2 in relation with ID and Location. In the picture below I'm sharing the type of results I want to achieve (divided in two levels):
1) General Analysis (left side): How many additions, how many confirmation and how many retirements from year 1 to year 2; and for the confirmed items how many has changed location and how many have kept it. While doing so, I'd like to be able to drill down to IDs of the items.
2) Flows (right side): Visualize the changes in Location associated to the items, again being able to drill down to the single ID.
I hope this simple example clarifies a little bit my question. Of course I am also thinking about a graphical way to represent those data in a clear way (chord visual?)
Thanks for the help you may be able to give me!!
You should try using three functions in the formula except, intersect and union as per need
https://docs.microsoft.com/en-us/dax/except-function-dax
https://docs.microsoft.com/en-us/dax/intersect-function-dax
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.
My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
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 |
---|---|
133 | |
91 | |
88 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
73 | |
68 |