Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.