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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
vilenm
Helper II
Helper II

Dax return missing rows with 0 but for specific year not all the years

Hi

 

I have this dax 

%Approved = Format(IF(CALCULATE(divide([No of Decisions Approved],[No of Decisions]),ALLSELECTED('DimActionTime'[Year]))=0,BLANK(),(CALCULATE(divide([No of Decisions Approved],[No of Decisions]),ALLSELECTED('DimActionTime'[Year]))))*100+0,"#,0;(#,0)")
 
The objective is to include rows with no results/values on matrix table, problem with +0 it returns all there years although its filtered on the year 2021. Please assist thanks
1 REPLY 1
amitchandak
Super User
Super User

@vilenm , I usually create a measure like this to control the date range after +0

 

0 between range
Measure = var _1= SUM(Opportunity[Opportunity count]) +0
var _min = minx(ALLSELECTED('Calendar'), 'Calendar'[Date])
var _max = maxx(ALLSELECTED('Calendar'), 'Calendar'[Date])
return
CALCULATE(if(max('Calendar'[Date]) <_min || max('Calendar'[Date]) >_max , BLANK(), _1))

 

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.