Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
So far i succeeded to compare yesterday with today. But i am doing this by creating two measures, one to get the value from yesterday and one to calculate the difference between yesterday and today. In my table I have 14 columns. Is there a way to compare the whole row at once?
Relationships
Everything comes from a single table (and measures form that table). Date has a many to one relationship with the table.
date - 1: many - table1
Measures1 - get the value from yesterday
com_test = VAR PriorDay = SELECTEDVALUE(table1[date])-1
RETURN
CALCULATE(
( 'table1'[gb_total_supply]),
ALL ( table1[date]),
table1[date] = PriorDay
)
Measures2 - calculate the difference in %
com_test % difference from gb_total_supply =
VAR __BASELINE_VALUE = [measure1]
VAR __VALUE_TO_COMPARE = [measure2]
RETURN
IF(
NOT ISBLANK(__VALUE_TO_COMPARE),
DIVIDE(__VALUE_TO_COMPARE - __BASELINE_VALUE, __BASELINE_VALUE)
)
Idealistic I would like to choose a value from the first table and then that value gets compared to a static day (today) in the second table, is this even possible in power bi?
I think you need to have that many measures. The only thing is if you need to change % only. You can create prior measure as var in that formula.
Thanks for your quick reply. Is there a way to make one measure from the two measures i'm currently working with?
Hi @Anonymous,
What is the structure of your data? How is the model setup? Depending on the configurations the answer will be different.
Please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490 (courtesy of @Greg_Deckler).
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCovering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |