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.
Hello guys,
I'm trying to do an Average based on a previous Sum. I'm connecting to Snowflake which doesn't have the Query Editor feature yet.
Here is the sample of data and final desired result. I'm also sharing the query that resolve it from SQL. I need the same in DAX.
Thanks in advance!
Note: the colored rows are the ones can be grouped.
Data sample and desired result.
Query that gives me the result
I tried this:
Here's a sample
ID CUSTNO PAYOR1 PATIENT CPT UNITS
89049079 CustNo1 Payor1 Patient1 CPT1 1
87987720 CustNo1 Payor1 Patient1 CPT2 4
87918407 CustNo1 Payor1 Patient1 CPT1 1
87987786 CustNo1 Payor1 Patient2 CPT1 2
87987758 CustNo1 Payor1 Patient2 CPT9 1
87987758 CustNo1 Payor1 Patient2 CPT1 6
87987786 CustNo1 Payor2 Patient7 CPT1 3
87987758 CustNo1 Payor2 Patient7 CPT9 9
87987758 CustNo1 Payor2 Patient7 CPT2 6
87987759 CustNo1 Payor2 Patient7 CPT9 12
I think the SUMMARIZE part is well reflecting the subquery to get TotalUnits, what I think it's missing it's the grouping part when it does the AVERAGE. Like I do in the external query.
For some reason it doesn't work for me. I'm attaching a more real data, maybe I was missing something important in the first sample. Would you mine take a look. https://www.dropbox.com/s/zdb0fqr7hnovp7g/Sample_Data.csv?dl=0
Really appreciate your help.
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 |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |