Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi Team,
I am currently creating Data for different KPIs, from multiple sources into 1 Pager in Matrix visual in Power BI desktop. However in 1 of the KPI named "eNPS", the data is till 2023 and does not have any data for 2024. Now the management wants that the data in that KPI needs to be visible as 0 in the table when we select 2024.
below is how the Visual currently looks:
when we select year 2023:
And when select Year as 2024, the KPI is not showing as data for 2024 is not in KPI so whole KPI is not visible:
How do we showcase the KPI and its data (as 0) even the data for that KPI for any year is missing ?
Thanks
Vaibhav
Hi @Vaibhav05 ,
You can refer to this example. In my data, there are only data from 2013 and 2014. Instead of the original result, you can create a measure that returns 0 when the calculation is blank.
Measure =
VAR _year = SELECTEDVALUE('DAX DateTable'[Year])
VAR _sum = CALCULATE(SUM('financials'[ Sales]),FILTER('financials','financials'[Year] = _year))
RETURN
IF(_sum = BLANK(), 0, _sum)
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi v-kaiyue-msft,
Thnaks you for the solution, when implemented it breaks the Matrix visual. In the visual we have Monthly and Yearly Targets coming from different files.
So is there any other way to make KPI visible with 0 values for missing year ?
How the visual looks before the measure:
And how that looks after applying the measure
Hi @Vaibhav05 ,
Can you share sample data in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
Best Regards,
Clara Gong
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Clara,
Basically, we are appending the data from different KPIs (having different data sources) in 1 single table and showcasing it on 1 page along with Monthly and Yearly Targets. (As below screenshot),
I dont have the access to attach the Power BI file. Is there any other way that i can share my file ?
Thanks
Vaibhav
Hi @Vaibhav05 ,
You can upload the PBIX file to a cloud storage service such as OneDrive, Google Drive (set up public access), SharePoint, or a Github repository, and then share the URL of the file.
Best Regards,
Clara Gong
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You can use COALESCE in your DAX measure.
https://learn.microsoft.com/en-us/dax/coalesce-function-dax
You can choose to return 0 when the value is blank. I suggest you do this as a separate measure as it will visualize 0 for any blank values.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
39 | |
27 | |
23 | |
23 | |
23 |
User | Count |
---|---|
56 | |
30 | |
22 | |
21 | |
20 |