Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi, I want to create in Power query the next table
1) I need to group by the ones that have the same date and hour
2) in each group make an "IF" selecting just the ones that have "Yes" in the "Correct" column, for those that have several rows in the group and at least one "Yes", select the one with the lower value in "Cost"
3) for those that have just one row and the value is "No" or several rows and all of them are "No", select the one with the lower value in "Cost".
4) The result table will be 1 row per group, keeping all the others columns on it.
Thank you so much in advance
Regards
Solved! Go to Solution.
Hi See attached the power bi file
you need to do multiple group by's to get the desired result.
Proud to be a Super User!
please provide your data in text format.
Proud to be a Super User!
Sure @vanessafvg
Original table
Es Date Cost Correct x y z
05/10/2021 07:05:43 p. m. 10 No Example Example Example
05/10/2021 07:13:06 p. m. 5 No Example Example Example
05/10/2021 07:13:06 p. m. 4 No Example Example Example
06/10/2021 05:17:13 p. m. 6 Yes Example Example Example
06/10/2021 05:17:13 p. m. 5 Yes Example Example Example
06/10/2021 05:17:13 p. m. 2 Yes Example Example Example
06/10/2021 05:17:13 p. m. 1 No Example Example Example
Result table
Es Date Cost Correct x y z
05/10/2021 07:05:43 p. m. 10 No Example Example Example
05/10/2021 07:13:06 p. m. 4 No Example Example Example
06/10/2021 05:17:13 p. m. 2 Yes Example Example Example
Hi See attached the power bi file
you need to do multiple group by's to get the desired result.
Proud to be a Super User!
User | Count |
---|---|
75 | |
75 | |
45 | |
31 | |
27 |
User | Count |
---|---|
99 | |
89 | |
52 | |
48 | |
46 |