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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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))

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors