Forum Discussion
Beginner help with finding the difference between two tables
- Anonymous4 years ago
Hi RD6308 ,
Since you did not give a specific table, I had to create my own table for testing according to your description, please point out if there are any problems.
Please try below steps:
1.below is my test table
Budget: "Index" column are used to sort the "Month" column by this column
Transcations:
Model:
2. create a measure and add it to table visual
Budget VS Actuals = VAR cur_month = SELECTEDVALUE ( Budget[Month] ) VAR cur_budget = CALCULATE ( MAX ( Budget[Amount] ), Budget[Month] = cur_month ) VAR cur_actuals = CALCULATE ( MAX ( Transcations[Amount] ), Transcations[Date] = cur_month ) VAR diff = cur_actuals - cur_budget RETURN IF ( diff > 0, "+" & diff, "-" & diff )Please refer attached .pbix file
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you. I have not been able to figure out realtionships previously. With the creation of DIM tables for 'Date' and 'Category', I am now able to create a One-to-Many relationship successfully.
I'll continue work on it from here and see how far I can get.
One issue I ran into -- it took Date Hierarchy away from my Actuals table. Dates now show up as (what I guess to be) plan text (ex. "Saturday, August 13, 2022"). Did I do something wrong?