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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Unexpected behavior with dax formula

I'm trying to break a total goal into daily numbers. With the help og @amitchandak I got the following formula:

 

Invest. Planejado/Dia = CALCULATE(SUMX(SUMMARIZE(filter(CROSSJOIN('planejado','dCalendario📆'),'dCalendario📆'[FullDate] >= planejado[data_inicio] && 'dCalendario📆'[FullDate]<= planejado[data_fim]),planejado[ChaveVeiculo],'dCalendario📆'[FullDate],planejado[investimento_plan],planejado[data_inicio],planejado[data_fim]),DIVIDE(planejado[investimento_plan],DATEDIFF(planejado[data_inicio],planejado[data_fim],day)+1)))
 
Unfortunately, I'm not having what I expected, as you can see in the image bellow. The 3rd collumn shows how the number should be in this particular situation, since this particular media has already finished.
 
Captura de tela 2020-11-19 112626.jpg
 
 

I appreciatte any help. 

4 REPLIES 4
v-yiruan-msft
Community Support
Community Support

Hi @Anonymous ,

Do you mean that the return result of measure [Invest. Planejado/Dia]? If yes, what's the correct result? Could you please provide the related calculation logic with examples. Thank you.

Unexpected behavior with dax formula.JPG

Best Regards
Community Support Team _ Rena Ruan
If this post helps, then please consider Accept it as the solution to help the other members find it more.

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

@Anonymous , Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

Anonymous
Not applicable

https://drive.google.com/file/d/1rfYO9tcOu-1PemlK67NOXMKZoUH5CEl3/view?usp=sharing

 

@amitchandak I made this following sample. Look at ROIX media channel, for example.

 

Tks for your support.

Anonymous
Not applicable

Were you able to download the file, @amitchandak ?

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.