Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I want to calculate with a DAX formula the Target of my KPI based on the filter of the date of the same month, but of the previous year and multiply by 2. FOR EXAMPLE, if I have in January 2020 count a total number of 100 for YourTable[date] as the number of rows (i.e. count the total number of rows of the YourTable[date] column corresponding to the period January 2020), then my Target for January 2021 should return 200.
If I have in 2020-01-01, 1000 as the number of rows of YourTable[date], then this should return me 2000 for 2021-01-01, as my Target. So, each time, my Target must take into account the number of rows for the same period and multiply it by 2. I use a Slicer to filter my dates. So, if I just select 2019 as the year and it returns 10000 as the number of rows, then my target should return 20000.
Hi,
Here is how to do this:
data:
Relationship:
DAX:
When a single date is selected the value changes accordingly.
Proud to be a Super User!
This one work only if i select the same day, month, year ? FOR EXAMPLE, if I have in January 2020 count a total number of 100 for YourTable[date] as the number of rows (i.e. count the total number of rows of the YourTable[date] column corresponding to the period January 2020), then my Target for January 2021 should return 200. It should then only consider only the total of the same month and year.
Hi @game1 ,
Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
9 | |
8 | |
8 |
User | Count |
---|---|
14 | |
12 | |
11 | |
11 | |
8 |