Forum Discussion

SamuelDesguin's avatar
SamuelDesguin
Regular Visitor
5 years ago
Solved

Using SWITCH with variables and filters in measures

Dear all, I have been running into a problem for which I could not find a solution here. Basically, I want to switch views between different ByCountry view or ByProduct view, depending on an unconne...
  • mahoneypat's avatar
    mahoneypat
    5 years ago

    You can't return a table in a SWITCH (or an IF), which is the problem with your measure.  You'll need to switch between full expressions (like Amit suggested).  You could explore using CROSSJOIN to precombine your filters or using Calculation Groups, but I don't know if that would work.

     

    Pat