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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
rssilvaba
Resolver II
Resolver II

How can I create a measure that encapsulates any period for a KPI visual?

Hi All,

I am not very good with Time inteligence neither much experienced in PBI. I was checking how to create a KPI Indicator visual that uses an all pages filter that you would enter the time period. So the KPI would need to be for any date and eventually would propagate it down.

If I put the year in the Trend axis it gives a the current correct numbers but obiviously this won't work with the filter or if the dates goes backwards more than an year. Any ideas how to that? I am guessisng that I would have a measure that get all dates as a table for the Items created date? I tried using DATESBETWEEN but I guess I that is not the case.

Thank you

 

EDIT:
https://drive.google.com/file/d/1bxPT4125mG6vGD1XuSsewaEydgIHSetK/view?usp=sharing
Added a sample PBI please check the Page2, see how the indicator should be 36 and the target 34 but if I used the created date I get a single value.

1 ACCEPTED SOLUTION

After futher reading about this visual I was able to properly get the goal and the number correct regardless of the dates. For that I needed to create a separeted table with the disctinc year for the all selected dates. So I get a single column with the year and that makes the visual show correctly the numbers with filtering.

 Here is the file in case anyone wants to peak.
https://drive.google.com/file/d/1WFBlvVHV7cS4F519BP-UphHRPhNi4gtb/view?usp=sharing

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@rssilvaba , this not clear at all. Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

Refer measure slicer
https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slic...
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/50...
https://www.youtube.com/watch?v=vlnx7QUVYME

 

refer

Power BI — YTD
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
Power BI — QTD
https://medium.com/@amitchandak.1978/power-bi-qtd-questions-time-intelligence-2-5-d842063da839
Power BI — MTD
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
Power BI — WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...
Power BI — Day Intelligence
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c324...

 

 

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-Y...


Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Edited with sample PBIX

After futher reading about this visual I was able to properly get the goal and the number correct regardless of the dates. For that I needed to create a separeted table with the disctinc year for the all selected dates. So I get a single column with the year and that makes the visual show correctly the numbers with filtering.

 Here is the file in case anyone wants to peak.
https://drive.google.com/file/d/1WFBlvVHV7cS4F519BP-UphHRPhNi4gtb/view?usp=sharing

parry2k
Super User
Super User

@rssilvaba it is very hard to understand from you post what you are trying to achieve. Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

As a best practice, add date dimension in your model and use it for and time intelligence calculations. Once the date dimension is added, mark it as a date table on table tools.

https://perytus.com/2020/05/22/create-a-basic-date-table-in-your-data-model-for-time-intelligence-ca...

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.