Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello,
I have single table with facts and dimensions data. I need to have table to show the kpis of projects for the current month and also the previous month along with indicators.
I am not getting how we can get the previous months kpi data along with current month when reporting month selected for current by user.
Attaching the sample data for referecne
| PRJ Name | Division | BU UNIT | ReportingDate | KPI |
| PRJ1 | DIV1 | BU1 | 25-Jun | 60% |
| PRJ2 | DIV1 | BU1 | 25-Jun | 85% |
| PRJ3 | DIV1 | BU2 | 25-Jun | 79% |
| PRJ4 | DIV1 | BU3 | 25-Jun | 93% |
| PRJ5 | DIV1 | BU1 | 25-Jun | 85% |
| PRJ6 | DIV2 | BU1 | 25-Jun | 85% |
| PRJ7 | DIV2 | BU1 | 25-Jun | 60% |
| PRJ8 | DIV2 | BU3 | 25-Jun | 60% |
| PRJ1 | DIV1 | BU1 | 25-Jul | 85% |
| PRJ2 | DIV1 | BU1 | 25-Jul | 60% |
| PRJ3 | DIV1 | BU2 | 25-Jul | 60% |
| PRJ4 | DIV1 | BU3 | 25-Jul | 60% |
| PRJ5 | DIV1 | BU1 | 25-Jul | 60% |
| PRJ6 | DIV2 | BU1 | 25-Jul | 60% |
| PRJ7 | DIV2 | BU1 | 25-Jul | 85% |
| PRJ8 | DIV2 | BU3 | 25-Jul | 43% |
Expected output: - Comparison is diff of Curr vs Prev
Solved! Go to Solution.
Hi @manojk_pbi
Can you please try the below steps to get your result ?
1. Create dim date table table and in that create a calculated column.
2. Create three measure using below dax.
------------------------------------------------------------------------------------
Result
If this answers your questions, kindly accept it as a solution and give kudos.
Hi @manojk_pbi
Create measure using below dax.
@mdaatifraza5556 , thanks for quick response and clarification on my doubts. The solution helped lot
Hi @manojk_pbi
Can you please try the below steps to get your result ?
1. Create dim date table table and in that create a calculated column.
2. Create three measure using below dax.
------------------------------------------------------------------------------------
Result
If this answers your questions, kindly accept it as a solution and give kudos.
How can we modify the KPI Comparison, not to show anything in comparison and no arrows when prev is not present.
Hi @manojk_pbi
Create measure using below dax.
Hello @mdaatifraza5556
I tried the sample provided by you but is not working in the main application. Then i realised there is a composite key "PRJ | MONTHYEAR" in the table. I am not getting the values now in the same row instead it is throwing in the another row.
This column is used to connect other tables to filter data based on project along with the rpeorting period.
Your advise is much appreciated.
| MONTHKEY | PRJ Name | Division | BU UNIT | ReportingDate | KPI |
| Jun-25|PRJ1 | PRJ1 | DIV1 | BU1 | 25-Jun | 60% |
| Jun-25|PRJ2 | PRJ2 | DIV1 | BU1 | 25-Jun | 85% |
| Jun-25|PRJ3 | PRJ3 | DIV1 | BU2 | 25-Jun | 79% |
| Jun-25|PRJ4 | PRJ4 | DIV1 | BU3 | 25-Jun | 93% |
| Jun-25|PRJ5 | PRJ5 | DIV1 | BU1 | 25-Jun | 85% |
| Jun-25|PRJ6 | PRJ6 | DIV2 | BU1 | 25-Jun | 85% |
| Jun-25|PRJ7 | PRJ7 | DIV2 | BU1 | 25-Jun | 60% |
| Jun-25|PRJ8 | PRJ8 | DIV2 | BU3 | 25-Jun | 60% |
| Jul-25|PRJ1 | PRJ1 | DIV1 | BU1 | 25-Jul | 85% |
| Jul-25|PRJ2 | PRJ2 | DIV1 | BU1 | 25-Jul | 60% |
| Jul-25|PRJ3 | PRJ3 | DIV1 | BU2 | 25-Jul | 60% |
| Jul-25|PRJ4 | PRJ4 | DIV1 | BU3 | 25-Jul | 60% |
| Jul-25|PRJ5 | PRJ5 | DIV1 | BU1 | 25-Jul | 60% |
| Jul-25|PRJ6 | PRJ6 | DIV2 | BU1 | 25-Jul | 60% |
| Jul-25|PRJ7 | PRJ7 | DIV2 | BU1 | 25-Jul | 85% |
| Jul-25|PRJ8 | PRJ8 | DIV2 | BU3 | 25-Jul | 43% |
Hello @mdaatifraza5556 , thanks lot for your quick reply and the solution. Great !!.
I have one question, do we need to have separate Date table why cann't we use the date from the same table ?
Hi @manojk_pbi
It will also work, but it is a best practice to create a separate Date table.
In some cases, especially when using time intelligence functions it works more reliably and ensures proper results.
If this answers your questions, kindly accept it as a solution and give kudos.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |