Search code examples
sql-servergroup-bypowerbidax

DAX TOP 1 COUNT of GROUPBY


I want to have a Card in Power BI with the result of the select

SELECT TOP 1 [COLUMN] FROM [Table]
GROUP BY [COLUMN]
ORDER BY COUNT([COLUMN]) DESC

How can I do something like this in dax?


Solution

  • enter image description here

    My problem was solved by making a

    SingleLeads = DISTINCTCOUNT(Fact_ProductRequests[COLUMN]) 
    

    I figure this out after checking that there were repeated values ​​in the column.

    It was probably, the desperation that settled in not getting the results I wanted, that made me open this question.

    Thank you all.