cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
nacorreialopes
New Member

How to converting translate measure tableau Fixed to dax measure

I have a tableau measure that is :

Fixed Cliente: Aderencia Ponderada = 
{Fixed [Cod Cliente Unif],MONTH([Data fat.1]),[Canal de Distribuição]:IIF(ISNULL([{Calc} Preço Bruto Ponderado (R$/Ton)]/[{Calc} Preço Alvo Ponderado (R$/Ton)]),NULL,[{Calc} Preço Bruto Ponderado (R$/Ton)]/[{Calc} Preço Alvo Ponderado (R$/Ton)],NULL)}

I tried this measure in dax , but when I  exploded this measure in other dimension in the same fact  (fct_PA_VPP_Custo_CPV)  - and this dimension is a column measure ("Grupo Repasse") and have circular dependency to this measure "Fixed Cliente"  , this vision no have the same values to have in Tableau.

VAR TabelaAgregada =
        SUMMARIZE(

 

           fct_PA_VPP_Custo_CPV,
            fct_PA_VPP_Custo_CPV[Cod Cliente Unif],
            fct_PA_VPP_Custo_CPV[mês],
            fct_PA_VPP_Custo_CPV[Canal de Distribuição],
        "PrecoBrutoPonderado", [Preço Alvo Perfomance_Preço Bruto (R$/Ton) ponderado],
        "PrecoAlvoPonderado", [Preço Alvo Perfomance_Preço Alvo Ponderado (R$/ton)],
        "Divisao ponderada", DIVIDE([Preço Alvo Perfomance_Preço Bruto (R$/Ton) ponderado], [Preço Alvo Perfomance_Preço Alvo Ponderado (R$/ton)], 0) )
   
RETURN
SUMX(
    TabelaAgregada,
   [Divisao ponderada]
)

Grupo Repasse =
VAR ClienteAderencia = [Fixed Cliente: Aderencia Ponderada]
VAR LimiteAderenciaEmpresarial = 0.8
VAR LimiteAderenciaRevenda = 0.85

RETURN
IF( and(fct_PA_VPP_Custo_CPV[Canal de Distribuição] = "EMPRESARIAL" , ClienteAderencia< LimiteAderenciaEmpresarial ), "Baixa Aderência",
 
IF ( and( fct_PA_VPP_Custo_CPV[Canal de Distribuição] = "REVENDA" ,ClienteAderencia  < LimiteAderenciaRevenda), "Baixa Aderência", "Alta Aderência"
)

)

column measure "Grupo repasse " in Power BI and Tableau .
nacorreialopes_1-1693842444781.pngnacorreialopes_2-1693842527583.pngnacorreialopes_3-1693842595470.png

The measure in dax about fixed result the same total of in tableau, but when I exploded this measure in ohter dimension that not to be in sumarize , tha values were wrong :

nacorreialopes_5-1693842883849.png

 


The vision in Tableau when I exploded the mesure Fixed with dimension "Grupo Repasse" 

nacorreialopes_4-1693842696447.png 

 

 

But  if I exploded in the same dimension that have in sumarize, the dax measure is the same in tableau and power bi 

 

nacorreialopes_6-1693842982880.pngnacorreialopes_7-1693842994639.png

 

how to resolved this in DAX ? I need converting these measure.
 
0 REPLIES 0

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors