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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
BigBadBob
Helper I
Helper I

Dax Measure

I think i am having a really off day today. I can not even see where to upload the PBIX file i have prepared.....

Anway, heres the prob and let me know if you would like the pbix file / where to upload

 

Requirement: A measure to show the difference between

  • A = ‘FACT’[Date Due] (calculated Column)
  • B = Selected Date (Measures table) driven by a slicer

 

If the answer is <0 give 0, if not give A-B

 

Thanks All

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@BigBadBob - If you do not have privileges to attach files, you generally have to use OneDrive, Box or some other file sharing service and post a link.

 

If I understand the question correctly, should be something like:

Measure =
  VAR __Diff = ( MAX('FACT'[Date Due]) - SELECTEDVALUE('Table'[Date]) ) * 1.
RETURN
  IF(__Diff < 0, 0, __Diff)

@ 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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
v-deddai1-msft
Community Support
Community Support

Hi @BigBadBob ,

 

Would you please inform us more detailed information( your  data(by OneDrive for Business)) if possible? Then we will help you more correctly.

 

Please do mask sensitive data before uploading.

 

Thanks for your understanding and support.

 

Best Regards,

Dedmon Dai

Greg_Deckler
Super User
Super User

@BigBadBob - If you do not have privileges to attach files, you generally have to use OneDrive, Box or some other file sharing service and post a link.

 

If I understand the question correctly, should be something like:

Measure =
  VAR __Diff = ( MAX('FACT'[Date Due]) - SELECTEDVALUE('Table'[Date]) ) * 1.
RETURN
  IF(__Diff < 0, 0, __Diff)

@ 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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
aj1973
Community Champion
Community Champion

Hi,

You cannot upload or attach a PIBX file in here, you need to provide a link where to find it, like google drive or dropbox. 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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