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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

DAX not matching for single selected records and matching with select all records

Hi , I have created DAX and the data is about employees 

I created a DAX which is working fine 

If i select the single record in slicer option it is showing wrong data 
If i select all it is showing correct data 
The shown data is taken in Card Visualisation

Thank you in advance

4 REPLIES 4
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

I wonder what your dax is like, which is important to solve the problem.

 

Best Regards

Allan

Greg_Deckler
Community Champion
Community Champion

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



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi @Greg_Deckler 

 

Please find the below Measeures i have used and let mw know why am i getting wrong values

 

ENDINGS = [STARTINGS]+COUNT(OnBoard[Date of joining (MM-DD-YYYY)])-(COUNT(Separation[Exit Date]))
Startings = [Last Period check]+[Last Period Employee]
Last Period Check =
var _min = minx(ALLSELECTED('OnBoard'),('OnBoard'[Date of joining (MM-DD-YYYY)]))

Return
CALCULATE(COUNT('OnBoard'[Date of joining (MM-DD-YYYY)]),filter(ALL('OnBoard'),'OnBoard'[Date of joining (MM-DD-YYYY)]< _min))
Last Period Employee =
var _min_date = minx(all('Calendar'),'Calendar'[Date])
var _Expression=if(ISFILTERED('CALENDAR'[Month Year]),maxx('CALENDAR',ENDOFMONTH(DATEADD('CALENDAR'[Date],-1,MONTH))),maxx('CALENDAR',DATEADD('CALENDAR'[Date],-1,YEAR)))
Return
CALCULATE(COUNTx(FILTER(Separation,Separation[Date of joining]<=_Expression && Separation[Date of joining]>=_min_date && (ISBLANK(Separation[Exit Date]) || Separation[Exit Date]>_Expression)),(Separation[Employee ID])),CROSSFILTER(Separation[Date of joining],'CALENDAR'[Date],None))
 
 Here in the total I have a a total count from Measure Endings and that dax is working fine. and for each individual division it is showing wrong values .Please help on this
DivisionENDINGS
 187
 187
a191
b189
c188
d239
e209
f198
g191
h188
Total284

@Anonymous , Those are reasonably complicated measures. It is going to be difficult to solve this without sample source data posted in text and then a definition of what wrong and right is.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors