Forum Discussion

kroman's avatar
kroman
Icon for Helper II rankHelper II
2 years ago

DAX Studio not returning all results

Hi All

I have a table in a PBI Dataset with few hundreds thousands rows and one of the columns is "Clients" .

If I do 

 

EVALUATE  
  VAR JustClients = DISTINCT('MyTable'[Client]) 
Return JustClients

 

or

 

EVALUATE  
  VAR JustClients = Summarize('MyTable',  'MyTable'[Client])
Return JustClients 

 

in a DAX Studio, it returns 64 rows

But if I do the same in PowerAutomate flow or PBI Desktop - it returns over 4k rows (which is correct)
So the question is - why its not returning all the rows in DAX Studio?
Thanks

2 Replies

  • Dangar332's avatar
    Dangar332
    Icon for Resident Rockstar rankResident Rockstar

    Hi, kroman 

     

    In first expression use calculatetable.

    Means

    EVALUATE  

      VAR JustClients = calculatetable(DISTINCT('MyTable'[Client]) )

    Return JustClients

     

    In your second query it give only unique value. 

    Means assume you have 10 distinct clients id and in your data one client has 10 entry so your total entry is 100(100 rows)

    When you use your second query in above data which contains 10 clients it give only 10 clients.

    Because summarize give unique value 

     

    Hope you get my point.

    • kroman's avatar
      kroman
      Icon for Helper II rankHelper II

      I think you may not be getting my point 
      The issue is that same query gives different results in PowerAutomate flow and DAX Studion

      Those 2 queries gives same results if running in PowerAutomate (4926 rows) but completly different if running in DAX Studion (64 rows for each of those 2 queries)