Forum Discussion
UG14
6 years agoFrequent Visitor
Distinct Count on a Column in Group By
I have to create a table in Power BI from SQL Query- **Select I.CompanyID, I.CompanyName, ID.Service, --Year(I.InvoiceStartDate) as Year, --Month(I.InvoiceStartDate) as Month, SUM(ID.TimeInvoi...
V-lianl-msft
Community Support
6 years agoHi UG14 ,
Try to create 2 measures:
Measure = CALCULATE(DISTINCTCOUNT(Table1[InvoiceStartDate].MONTH),ALLEXCEPT(Table1,Table1[TimeInvoiced ],Table1[FinalServiceAmount ]))
Measure 2 = SUMX(ALLEXCEPT(Table1,Table1[XX]),[Measure])
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.