Forum Discussion
How can I find the difference between two filtered values?
Thank you for providing the sample data. That helps a lot with proposing a potential solution.
You may want to consider unpivoting your source data (Index History table) to make it more palatable for Power BI
Then you will want to add a proper Calendar table to your data model and fix your data model relationships.
Hello! Thank you for your reply and i appreciate the tips. The calendar table is something very useful and I am most certainly going to adhere.
Unpivotting the Index History Table surely will help make Power BI data more "lighter", but since I need to do a subtraction between values of each index according to two different date filters (both external filters), i think it wouldn't be possible to do that by creating only one column with all the indexes, right? I could be wrong, so if you have any ideas of how i could do this please let me know hehe
- lbendlin3 years ago
Super User
You can then use measures to calculate the differences. Give it a try and see if that setup makes it easier for you.
- Relannes3 years agoFrequent Visitor
Just did the calendar table and re-did the relationships. Tried unpivotting the table but since i need the value per each index in a card, i wasn't able to calculate the difference, so i kept the index structure.
The cards change according the filters just fine, but even after this changes, the measure i've created to do the difference it's still not working. Do you have any idea why's that?
- lbendlin3 years ago
Super User
Rewrite your measures to use the calendar date as needed.