Forum Discussion

runatthakorn's avatar
runatthakorn
Regular Visitor
4 years ago
Solved

Row Subtotal from Distinctcount is incorrect

Hi Everyone,   I have used Subtotal from Distinctcount in the table and the result is incorrect. I used 2 measures for the calculation below.     visit(cal) = DISTINCTCOUNT(Spending[date])   ...
  • v-luwang-msft's avatar
    4 years ago

    Hi runatthakorn ï¼Œ

    Refer the below ,according your provided,similar question:

    2+2 ,get  total:3

    You need to create a new measure:

    test = if(HASONEVALUE(Spending[branch_name]),[visit(cal)],SUMX(DISTINCT(Spending[branch_name]),[visit(cal)]))

    Output:

     

    Did I answer your question? Mark my post as a solution!


    Best Regards

    Lucien