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,
I have 3 tables which are all linked to each other.
Now i am doing group by which includes all the 3 table columns and it returned some records.
Now i want the result set records count. How do i get that. Please help me..
Please do refer the below DAX function,
https://msdn.microsoft.com/en-us/query-bi/dax/count-function-dax
@SivaMani i need overall records count. Like we have in SQL
Select Count(*) from TableA Group by ColumnA
Hi @Anonymous,
How did you group the tables? Please try the function "COUNTX". Reference: query-bi/dax/countx-function-dax. It could be like below.
Measure = Countx([Groupby table], [to count column name])
Best Regards,
Dale
Hi @v-jiascu-msft,
I have three tables with those tables i am doing the group by.
If i am using the CountX function i need to specify only one table then the result will be wrong.
Hi @Anonymous,
How did you do "Groupby" for now? The first parameter of COUNTX is a table expression, which means we can put a expression that returns a Table. Can you share a sample?
Best Regards,
Dale
Hi @v-jiascu-msft,
Please check the below query,
EVALUATE
SUMMARIZECOLUMNS(
Table1[ColumnA],
Table1[ColumnB],
Table2[Column2],
Table3[Column4],
FILTER(VALUES(Table1[ColumnA]),Table1[ColumnA]="ABC"),
"Total",SUM(Table1[CreditAmount])
)
EVALUATE
ROW("count",
COUNTROWS(
SUMMARIZECOLUMNS(
Table1[ColumnA],
Table1[ColumnB],
Table2[Column2],
Table3[Column4],
FILTER(VALUES(Table1[ColumnA]),Table1[ColumnA]="ABC"),
"Total",SUM(Table1[CreditAmount])
)))
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 |
---|---|
111 | |
96 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |