Forum Discussion

Peter_23's avatar
Peter_23
Advocate V
1 year ago
Solved

Dimension columns with all values

Hi Power bi users 🙂 , I'm trying to figure out a calculated dimension (Stores) with values: currently and past values, and slicer to change the months. When I select Jan-Feb24 in slicer I compared this period with Jun-Jul23 this fine, but the C store in the currently period doesn't have value so it's missing in table 😞 . But the total is correct.

 

How to it's possible to  show the all values in dimension (store)?

I attach pbix file 

 

Thanks in advance.

 

 

 

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi, Peter_23 

     

    You can try the following methods.

    Measure 1 = 
    Var _table=SUMMARIZE(Stores,Stores[Stores],"Sum sales",[Currently])
    RETURN
    SUMX(_table,[Sum sales])
    Measure 2 = 
    Var _table=SUMMARIZE(Stores,Stores[Stores],"Sum previous",[Previous])
    RETURN
    SUMX(_table,[Sum previous])

    Is this the result you expected?

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

9 Replies

  • Select "Show items with no data"  for the Stores column.

    • Peter_23's avatar
      Peter_23
      Advocate V

      I select this option, but it doesn't work 😞

      • lbendlin's avatar
        lbendlin
        Super User

        Your time filter interfered.

         

        You need to invest in a calendar table and/or in a disconnected table for the slicer.

         

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi, Peter_23 

     

    Have you solved your problem yet? I failed to open your link. If your problem has not been solved, please provide more information about the source data.

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi, Peter_23 

         

        You can try the following methods. Create a new table.

        Currently = CALCULATE(SUM(Hoja1[Sales]),FILTER(ALLSELECTED(Hoja1[Time],Hoja1[Stores]),[Stores]=SELECTEDVALUE(Stores[Stores])))
        Previous = CALCULATE([Currently],FILTER(ALL(Hoja1),[Year Order]=SELECTEDVALUE(Hoja1[Year Order])-1))

        Is this the result you expected?

         

        Best Regards,

        Community Support Team _Charlotte

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.