cancel
Showing results for
Did you mean:
Highlighted
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

Accepted Solutions
Highlighted
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!

Proud to be a Super User!

3 REPLIES 3
Highlighted
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

Highlighted
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!

Proud to be a Super User!

Highlighted
Microsoft

## Re: Dax Measure

Thanks for your understanding and support.

Best Regards,

Dedmon Dai

Announcements

#### August 2020 Community Challenge: Can You Solve These?

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

#### July 2020 Community Highlights

Learn about the exciting things that happened in July.

#### 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

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

Top Solution Authors
Top Kudoed Authors