Hi, I am a newbie to Power BI.
I have a dataset as attached. I need to find the maximum value for each person for each week. I have written the formula in Excel
=MAX(IF(A$2:A$41 = A2, IF(C$2:C$41 =C2, B$2:B$41)))
How can I convert it to DAX or write the same formula in Power BI?
I tried the DAX Code as below, But it did not work. Any suggestions/corrections, please?
Weekly Maximum = Max(if(PT[Person]= PT[Person],IF(PT[Weeks]=PT[Weeks]),PT[value]))
And also to write a formula for taking data from two different tables.
Solved! Go to Solution.
@Zubair_Muhammad Thank you so much. Your solution worked.
Is it possible to have max(value) of the 2nd week in first, 3rd week in second and so? I need to visualize the progress in the value comparing to the previous week.
Any suggestion would be highly valuable. Thank again 🙂
Hi @Zubair_Muhammad I am trying to create the expected value from my dataset below.
I am trying to calculate the Max Value by Category using the formula below,
Weekly Maximum = CALCULATE ( MAX ( PT[total energy (J/kg)] ), ALLEXCEPT ( PT, PT[athlete], PT[WeekSequence] , PT[session category] = "MATCH") )
But was throwing me an error.
Once I calculate this, then I need to calculate the Expected value for each week, that has the maximum value of the previous week * 2.85, as shown in the screenshot.
Can I do all this in one new column, or should I add another column to add the expected weekly values?
Thank you so much @Zubair_Muhammad. This worked perfectly. Thanks a lot.
Can you kindly suggest me some good resource for Learning DAX and Power query, please!! Much needed for my work now.