Forum Discussion

IK's avatar
IK
Regular Visitor
2 years ago
Solved

Dax

Hi. I have a sales plan for managers, not for clients. When I build a hierarchy in a matrix of tables, where first the manager is then the client, I want the plan to show only for managers, and not for clients. Can anybody please correct my code? My tables are interconnected with each other. they are different tables.

 

 

Spoiler
Manager plan=CALCULATE ( SUM('Manager_Plan'[Plan, %]))

 

 
 
 
  • Hi,

    Please try this formula:

    Manager % = 
    IF(
        ISINSCOPE(T_FormulaDax[ManagerID]) && NOT(ISINSCOPE(T_FormulaDax[Client])),
        SUM(T_FormulaDax[Plan%]),
        ""
    )


    In my example is working as you want. Please let me know if this solve your problem.

     

7 Replies

  • _AAndrade's avatar
    _AAndrade
    Resident Rockstar

    Hi,

    Try this:

    IF(

    ISINSCOPE( name of your manager column),

    CALCULATE( SUM('Manager_Plan'[Plan, %]))
    )

    • IK's avatar
      IK
      Regular Visitor

      Hi. Thank you for reply. But it doest work((

      • _AAndrade's avatar
        _AAndrade
        Resident Rockstar

        Hi,

        Please try this formula:

        Manager % = 
        IF(
            ISINSCOPE(T_FormulaDax[ManagerID]) && NOT(ISINSCOPE(T_FormulaDax[Client])),
            SUM(T_FormulaDax[Plan%]),
            ""
        )


        In my example is working as you want. Please let me know if this solve your problem.

         

  • IK's avatar
    IK
    Regular Visitor

    I want in result empty cell for clients. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi, IK 

    Have you solved the current problem? _AAndrade  in the latest reply, a good solution is provided. 

     

     

     

    How to Get Your Question Answered Quickly

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

    Best Regards

    Jianpeng Li