cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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

Accepted Solutions
Highlighted
Super User IV
Super User IV

Re: Dax Measure

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

---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
Highlighted
Post Prodigy
Post Prodigy

Re: Dax Measure

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
https://www.linkedin.com/in/amine-jerbi-2b3a8928/

Did I answer your question? Mark my post as a solution!
Highlighted
Super User IV
Super User IV

Re: Dax Measure

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

---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

Highlighted
Microsoft
Microsoft

Re: Dax Measure

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

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Solution Authors
Top Kudoed Authors