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 guys.
I have a table and I want to count the rows of each group. The detail is that I want to filter by a specific column, not using a simple filter, but filtering so that all the rows in each group contain a specific value. This image is quite explanatory:
I know the syntax of SUMMARIZECOLUMNS, I just don't know how can I do this without using a rather stupid and costly approach in terms of processing:
TEST = SUMMARIZECOLUMNS ( service_kpi_parts_orders_importer[order_id], service_kpi_parts_orders_importer[part_number], service_kpi_parts_orders_importer[order_creation_year], service_kpi_parts_orders_importer[position], service_kpi_parts_orders_importer, "TYPES", CALCULATE ( DISTINCTCOUNT ( service_kpi_parts_orders_importer[delivery_type] ) ), "TYPES TO FILTER", CONCATENATEX(VALUES(service_kpi_parts_orders_importer[delivery_type]),service_kpi_parts_orders_importer[delivery_type],UNICHAR(10) ) )
Here I was trying to create a table and test some possibilities, but no success so far.
Can you suggest something? Something leaner and less processing-expensive?
Thanks in advance.
Cheers!
Solved! Go to Solution.
Hi @Anonymous ,
I thought that the only one you wanted to take out was the F you should redo to this:
positions = CALCULATE ( COUNTROWS ( FILTER ( SUMMARIZE ( ADDCOLUMNS ( service_kpi_parts_orders_importer; "yeardatum"; service_kpi_parts_orders_importer[year] ); service_kpi_parts_orders_importer[order_id]; service_kpi_parts_orders_importer[part_number]; [yeardatum]; service_kpi_parts_orders_importer[position]; "COUNT"; DISTINCTCOUNT ( service_kpi_parts_orders_importer[delivery_type] ); "Type_Order"; CONCATENATEX ( ALLSELECTED ( service_kpi_parts_orders_importer[delivery_type] ); service_kpi_parts_orders_importer[delivery_type]; "." ) ); [COUNT] = 1 && [Type_Order] = "S" ) ) )
The bold part of the measure is the filter you should change to get the order type you want.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCovering 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 |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |