Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hi Guys. Wanted some help on the following.
I have a table with two different dates showing two different revenue amounts.
| ID | Claim Date | Claim Revenue | Claim Due Date | Due Date Revenue |
| 1 | 1/04/2020 | $ 123.00 | 1/04/2020 | $ 250.00 |
| 2 | 1/05/2020 | $ 150.00 | 1/05/2020 | $ 500.00 |
| 3 | 1/06/2020 | $ 271.00 | 1/06/2020 | $ 750.00 |
| 4 | 1/07/2020 | $ 329.33 | 1/07/2020 | $ 1,000.00 |
| 5 | 1/07/2020 | $ 429.44 | 1/07/2020 | $ 1,250.00 |
I am basically after a two fold step.
On the same chart, I would like to show (if possible) the Sum of Claim Revenue and Sum of Due Date Revenue only for the current month.
for example, for month of May20, it should show two bar graphs (claimed revenue and due date revevue), which changes automatically to Jun20 next month.
Solved! Go to Solution.
Hello @Anonymous ,
You need to take help of a calendar table
Once added in the model, create the relationship between the calendar table date, and Claim Date & Claim Due Date
Then you can create following measures for calculating the total revenue on claim date and due date
Total Claim Revenue =
CALCULATE(
SUM(dtTable[Claim Revenue]),
USERELATIONSHIP(dtCalendar[Date],dtTable[Claim Date])
)
Total Due Date Revenue =
CALCULATE(
SUM(dtTable[Due Date Revenue]),
USERELATIONSHIP(dtCalendar[Date],dtTable[Claim Due Date])
)
You will get the following results:
Alternatively, you can use TREATAS function and skip the Relationship creation part suggested above (Calendar table is required though):
Total Revenue =
CALCULATE(
SUM(dtTable[Claim Revenue]),
TREATAS(VALUES(dtCalendar[Date]),dtTable[Claim Date])
)
Total Due Date Revenue =
CALCULATE(
SUM(dtTable[Due Date Revenue]),
TREATAS(VALUES(dtCalendar[Date]),dtTable[Claim Due Date])
)
Cheers!
Vivek
If it helps, please mark it as a solution
Kudos would be a cherry on the top 🙂
https://www.vivran.in/
Connect on LinkedIn
Hello @Anonymous ,
You need to take help of a calendar table
Once added in the model, create the relationship between the calendar table date, and Claim Date & Claim Due Date
Then you can create following measures for calculating the total revenue on claim date and due date
Total Claim Revenue =
CALCULATE(
SUM(dtTable[Claim Revenue]),
USERELATIONSHIP(dtCalendar[Date],dtTable[Claim Date])
)
Total Due Date Revenue =
CALCULATE(
SUM(dtTable[Due Date Revenue]),
USERELATIONSHIP(dtCalendar[Date],dtTable[Claim Due Date])
)
You will get the following results:
Alternatively, you can use TREATAS function and skip the Relationship creation part suggested above (Calendar table is required though):
Total Revenue =
CALCULATE(
SUM(dtTable[Claim Revenue]),
TREATAS(VALUES(dtCalendar[Date]),dtTable[Claim Date])
)
Total Due Date Revenue =
CALCULATE(
SUM(dtTable[Due Date Revenue]),
TREATAS(VALUES(dtCalendar[Date]),dtTable[Claim Due Date])
)
Cheers!
Vivek
If it helps, please mark it as a solution
Kudos would be a cherry on the top 🙂
https://www.vivran.in/
Connect on LinkedIn
Hi @vivran22 . Worked a treat my friend. Thanks for your help and indepth explanation with screenshots. Helped alot.
@Anonymous , you can connect both dates with a same date table and use userelation to change the date
refer to example in blog how to use
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.
Hi Amit. So I implemented a date table, and joined that with my main table through two relationships. One active and the other non active. The problem is, the amount being calculated is the overall amount, and not separated according to the months.
Hi Amit.
Thanks for the reply. How would you calculate the current month?
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 43 | |
| 37 | |
| 34 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 65 | |
| 65 | |
| 30 | |
| 26 | |
| 25 |