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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Nischal
Helper I
Helper I

the below dax is returning blank i want only for last day

Lastday = CALCULATE(DISTINCTCOUNT(survey_reports[responseId]), LASTDATE(date1[Date].[Date]))

8 REPLIES 8
Phil_Seamark
Employee
Employee

Hi @Nischal

 

Do you have a screenshot showing the error (and the visuals)


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

blank is the visualblank is the visual

Lastday = CALCULATE(DISTINCTCOUNT(survey_reports[responseId]), LASTDATE(survey_reports[date]))

 

if I am using the date from the date table its showing blank...... need to fix this **bleep**

tnx in advance

Lastday = CALCULATE(DISTINCTCOUNT(survey_reports[responseId]),LASTDATE(date1[Date]))

Hi @Nischal

 

The LASTDATE function is probably returning the very last day in your Date table - which probably goes off into the future.  I'm wondering if you actually need the date of the most recent transaction?


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

yes! you are right !! I need the date of a most recent transaction .... I have used the max function  to get the end date in the date table so that should not be the issue

Cool, then can you please share the names of the columns in your transaction table


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

when I create a relationship between date table and survey table the visual gets blank if I delete the relationship it is giving me a total

 

 columns in the transaction table

 

survey id 

question

answer

store id

response id

date

motion 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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