Forum Discussion
Revathi_Kannan
Helper I
4 years agoCOUNTROWS WITH MULTIPLE COLUMNS
Hi all, I am looking for the solution for the past 2 weeks but i am unable to find the DAX functions which i can do it in excel. Please refer the below image.. I have 2 columns but my result ha...
- 4 years ago
Hi,
Please check the below DAX formula and the attached pbix file.
It is for creating a new table.
New Table = ADDCOLUMNS ( VALUES ( Data[Employee] ), "@CategorySummary", CALCULATE ( IF ( COUNTROWS ( VALUES ( Data[Category] ) ) = 2, "BothCategory", VALUES ( Data[Category] ) ) ) ) - 4 years ago
Hi,
Please check the attached file.
Thanks.
Jihwan_Kim
Super User
4 years agoHi,
Please check the below DAX formula and the attached pbix file.
It is for creating a new table.
New Table =
ADDCOLUMNS (
VALUES ( Data[Employee] ),
"@CategorySummary",
CALCULATE (
IF (
COUNTROWS ( VALUES ( Data[Category] ) ) = 2,
"BothCategory",
VALUES ( Data[Category] )
)
)
)Revathi_Kannan
Helper I
4 years agoJihwan_Kim Thank you so much for you reply.. It works in small data.. i have 85k records so i cannot create a table and paste the details manually for all 85k records. Please correct me if i am wrong.. also it is live data it needs to be refreshed automatically for SQL. So if i create the table for this measure, will it work on the Live records ?