Forum Discussion
Calculate by date
Hi, please I need your help. I need this function to calculate by day.
Example:
I want it to calculate for the 3 entries I have for the day 01/01/2020, then if I have 01/02/2020 I want to calculate the same function but as a separate value. The reason I ask is that currently, it mixes up the values when I filter it by month when I filter it by the date it works, so I want it to display the right values when I filter it by month.
Hope I was clear, thank you so much for your time.
I'm new to power bi 😞
3 Replies
- Greg_DecklerCommunity Champion
santiagow99 Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2. - amitchandakSuper User
santiagow99 ,The information you have provided is not making the problem clear to me. Can you please explain with an example.
But you can use a month behind measure with date tableMonth behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Month))
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/
See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-YTD-LYTD-Week-Over-Week/m-p/1051626#M184
Appreciate your Kudos. - v-xuding-msftCommunity Support
Hi santiagow99 ,
Have you resolved it? If yes, please share your own solution. Others will benefit from this thread. If you still need help, can you please share some sample data your expected results? We will understand clearly and solve it quickly.