Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
76 | |
73 | |
42 | |
36 |
User | Count |
---|---|
109 | |
56 | |
52 | |
48 | |
43 |