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.
Hi all,
I'm new to PowerBI and no experience of DAX (to speak of).
I need to reduce the nr of rows in a report, based on the values of 2 columns.
For the same Request Nr, i have multiple rows with the same value in the "All Return Reasons" column.
How do i write a code to only have 1 row for each of the values in the "All Return Reasons" column?
See below example.
Thank you
Solved! Go to Solution.
Hi @Anonymous ,
In Power Query, multi-select (Ctrl+click) your [Request ID] and [All Return Reasons] columns then, on the Home tab, go to Remove Rows > Remove Duplicates.
Pete
Proud to be a Datanaut!
Hi @Anonymous ,
In Power Query, multi-select (Ctrl+click) your [Request ID] and [All Return Reasons] columns then, on the Home tab, go to Remove Rows > Remove Duplicates.
Pete
Proud to be a Datanaut!
thanks @BA_Pete .
Does this also works for multiple Request Nrs with the same list of return reasons?
Thanks
By selecting the [Request Nr] column along with the [All Return Reasons] column, you're essentially creating an instruction that says:
"Remove any duplicated combinations (imagine concatenating these two fields then removing duplicates from the concatenated list) of [Request Nr] and [All Return Reasons]" so yes, this will work to remove duplicates within each [Request Nr] group separately.
If you only selected [All Return Reasons] before removing duplicates, it would just give you a unique list of this field, and would remove instances where the return reason was present again within a different Request Number.
Pete
Proud to be a Datanaut!
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 |
---|---|
100 | |
54 | |
21 | |
12 | |
11 |