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

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

Reply
yannkonin
Frequent Visitor

Dax measure : Counting Rows for the Next Day - Help Needed!

I'm having trouble counting rows for the next day using my DAX code. Can someone please help me understand why the "NuitMatinCount" isn't returning any results?


I'd appreciate any insights into why the "NuitMatinCount" variable isn't providing the expected results. Thanks in advance!
Here's my DAX code:

 

Effectif Nuit =
VAR CurrentDate = MAX(data_chargeuses[Date])
VAR Next = (CurrentDate + 1)
VAR NuitSoirCount =
CALCULATE(
DISTINCTCOUNT(data_chargeuses[Nom Conducteur]),
data_chargeuses[Shift] = "Nuit-Soir",
data_chargeuses[Date] = CurrentDate
)
VAR NuitMatinCount = CALCULATE(
DISTINCTCOUNT(data_chargeuses[Nom Conducteur]),
data_chargeuses[Shift] = "Nuit-Matin",
data_chargeuses[Date] = Next
)

RETURN
NuitSoirCount + NuitMatinCount

1 REPLY 1
lbendlin
Super User
Super User

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.