Forum Discussion

BH12's avatar
BH12
Frequent Visitor
3 years ago
Solved

The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.

Newer user here: I was able to get this to work by doing 2 measures,  I want to make it one measure.  I am not able to find any solution that works for me.  Thanks!

 

distictRoadmapsCreatedGDC =
Var GDCB =
    DISTINCT(SELECTCOLUMNS(FILTER(z_rpt_view_user_actions,z_rpt_view_user_actions[activityType] = "create_roadmap"),"uniqueUserMonth",z_rpt_view_user_actions[uniqueUserMonth],"monthYear",z_rpt_view_user_actions[MonthDate],"GDC",z_rpt_view_user_actions[monthGDC],"userId",z_rpt_view_user_actions[userId]))
Return
    if (GDCB = 0, Blank(), GDCB)
  • BH12 DISTINCT return a table and measure need a value so have it like

    Return
    if (countrows(GDCB) = 0, Blank(), countrows(GDCB) )

     

1 Reply

  • BH12 DISTINCT return a table and measure need a value so have it like

    Return
    if (countrows(GDCB) = 0, Blank(), countrows(GDCB) )