Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi,
am new to PBI and PQ, request your help regarding how to add a new column by finding max value in a row. table format details are attached herewith. am looking to add a column which will give the maximum collection of a busnumber by comparing collecitons on Sunday, Monday and Tuesday .
for eg: KNR01 maximum collection is on Monday so in the new column i want to show value of Monday
Solved! Go to Solution.
Hello there @Anonymous ! To get your desire result, I would recommend the following:
1. Go to PQ, and select your "busnumber" and "SEATINGCAPACITY" columns and unpivot the other columns. You then get a "Attribute" and a "Value" column where your Attribute becomes the "Day" and the Value becomes the seatings (I suppose)
2. Close and Apply PQ
3. Add the following measure
Max Value =
CALCULATE (
SELECTEDVALUE ( Table[busnumber] ),
FILTER ( Table, [Value] = MAX ( Table[Value] ) )
)
4. Add the measure to your table visual and check the results.
Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!
You can also check out my LinkedIn!
Best regards,
Gonçalo Geraldes
You can use following formula to get Max in PQ
=List.Max({[Sunday],[Monday],[Tuesday]})
You can use following formula to get Max in PQ
=List.Max({[Sunday],[Monday],[Tuesday]})
Hi Vijay,
i would like to get the result as max value + the day
for eg: 6100 -> Monday
kindly advise
Hi Vijay,
Thanks a lot
👍
Hello there @Anonymous ! To get your desire result, I would recommend the following:
1. Go to PQ, and select your "busnumber" and "SEATINGCAPACITY" columns and unpivot the other columns. You then get a "Attribute" and a "Value" column where your Attribute becomes the "Day" and the Value becomes the seatings (I suppose)
2. Close and Apply PQ
3. Add the following measure
Max Value =
CALCULATE (
SELECTEDVALUE ( Table[busnumber] ),
FILTER ( Table, [Value] = MAX ( Table[Value] ) )
)
4. Add the measure to your table visual and check the results.
Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!
You can also check out my LinkedIn!
Best regards,
Gonçalo Geraldes
@goncalogeraldes @Anonymous @Vijay_A_Verma How to print the max # of that row in this case? For example: For KNR001, The max of value of Sunday, Monday, Tuesday is 6100. How can the result be 6100?
Hi goncalogeraldes,
i would like to get the result as max value + the day
for eg: 6100 -> Monday
kindly advise
Hi Goncalogeraldes,
Thank you so much
👍
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 5 | |
| 5 | |
| 4 |