Forum Discussion

arulsettu's avatar
arulsettu
Frequent Visitor
9 years ago

Fixed in power bi

HI,

 

   I am very new to power bi. acutally i am trying to convert TABLEAU app into power bi.

 

in a chart there is caluclated dimension created as below

 

{ FIXED [Year Week]: MAX([End Time])}

 

 

Year Week is year and week from a date field

 

so to do this power bi i did as follows

 

Year Week = FORMAT([end_time].[Date],"yyyy")&WEEKNUM([end_time].[Date],2)  ---> in text format

 

And for { FIXED [Year Week]: MAX([End Time])} i did below

 

CALCULATE(MAX([end_time].[Date]),ALL(Year Week))   ---->date format

 

but not getting the output

 

can anyone help me on this

 

7 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    I believe what you want is:

     

    CALCULATE(MAX([end_time].[Date]),ALLEXCEPT([Year Week])) 

    My understanding of FIXED is that it in your case your formula will calculate MAX of [End Time] in the context of [Year Week] regardless of any other dimensions in the view.

     

    The equivalent of that should be ALLEXCEPT in that ALLEXCEPT removes all context other than those specified in the function. 

    • arulsettu's avatar
      arulsettu
      Frequent Visitor

      Thanks for the reply

       

      by using this

       

      CALCULATE(MAX([end_time].[Date]),ALLEXCEPT('table_name',[Year]))

       

      i am getting only one value 

       

      31/dec/2016

       

       

      and above calcluation i am using as dimension.

       

      can you check this

       

       

      Thanks

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi arulsettu,

         

        >>i am getting only one value 

        If you only drag this measure to a visual, you will get the max date. You can add other columns to work through this issue.

         

        Regards,

        Xiaoxin Sheng

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi, 
    I'm very new to tableau, 
    I'm migrated this form of tableau for Power BI 

    in a collum of table there is calculated dimension created as below


    Vda Forn Cat
    { FIXED [Regiao IM], [Nome Fabricante], [Nome Categoria], [Mercado] : SUM([Vendas Valor])}

    so to do this power bi i did as follows:

    Metrics = CALCULATE([Vendas Valor Cat]; ALLEXCEPT(DIM_CATEGORIA_AGREG;DIM_CATEGORIA_AGREG[REGIAO_IM];DIM_CATEGORIA_AGREG[NOME_FABRICANTE];DIM_CATEGORIA_AGREG[NOME_CATEGORIA];DIM_CATEGORIA_AGREG[MERCADO]))