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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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