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.
This is what the data looks like. Now, the problem statement is, I need to find the dates at which each product's price changed. This data keeps on updating on daily basis. I already have a slicer on my dashboard that allows me to select a product by Item ID. So, if i select Item id 112 and from the price change slicer, I select True, it should give me the following output.
SO basically, I want to add a new column with boolean values (True/False), which shows True, if there is a cost change as compared to the previous cost and false if it is the same as the previous cost.
Price Change = IF(FILTER(Sheet1, Sheet1[Item ID]=EARLIER(Sheet1[Item ID]) && Sheet1[Rank]=EARLIER(Sheet1[Rank])+1 && Sheet1[Cost]<>EARLIER(Sheet1[Cost])),TRUE,FALSE)
I used this, but it's giving me an error
Solved! Go to Solution.
@Vijay_A_Verma 's solution worked like a charm aswell!
Price Change = IF(Sheet1[Rank]=1,TRUE(),(COUNTROWS(FILTER(Sheet1, Sheet1[Item ID]=EARLIER(Sheet1[Item ID]) && Sheet1[Rank]=EARLIER(Sheet1[Rank])-1 && Sheet1[Cost]<>EARLIER(Sheet1[Cost])))>0))
Thank you everyone!
Hi @schrodinger ,
You can try something like this :
Kind regards,
Rohit
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 🙂
@Vijay_A_Verma 's solution worked like a charm aswell!
Price Change = IF(Sheet1[Rank]=1,TRUE(),(COUNTROWS(FILTER(Sheet1, Sheet1[Item ID]=EARLIER(Sheet1[Item ID]) && Sheet1[Rank]=EARLIER(Sheet1[Rank])-1 && Sheet1[Cost]<>EARLIER(Sheet1[Cost])))>0))
@schrodinger , This need to be something like that
Price Change = IF(Sheet1[Cost] = maxx(FILTER(Sheet1, Sheet1[Item ID]=EARLIER(Sheet1[Item ID])
&& Sheet1[Rank]=EARLIER(Sheet1[Rank])+1 ) ,Sheet1[Cost]),TRUE(),FALSE() )
Covering 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 |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |