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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
larryc
New Member

Measure causing sum not to work.

Hello,

 

Here is the report I am working on: DOWNLOAD

 

 

Problem:  When the report date changes, I must be able to supply the correct exchange rate as of that selected report date. This forces me to use a measure as calculated columns can not contain dynamic user selected data as they are loaded at runtime.

 

So if you look in the report XRATE supplies the correct exchange rate as of the report date selected by the end user. The problem is that any other measure that calculates based on this XRATE measure will NOT sum.

 

Can anyone figure out what is happening or is the DAX engine simply broken at this time?

 

Thanks

 

 

 

4 REPLIES 4
Vvelarde
Community Champion
Community Champion

@larryc

 

Hi, The issue is the IF(HASONEVALUE....) in your measure.

 

So when the total is evalualted the HASONEVALUE is FALSE the measure dont apply your calc.

 

I'm going out to the office but try to modify or reevaluate this and will work.

 

Regards

 

Victor

Lima - Peru




Lima - Peru

Vvelarde,

 

In all my reading, you MUST use HasOneValue . There is simply no other option and there are no other calculations that can lookup a value in another table based on the report date without using HasoneValue.

 

Every single instance I have reviewed on the internet requires HASONEVALUE

 

I beleive I have just stumped the entire DAX community!   This is certainly a BUG!!!!!

 

 

If I use this formula: 

 

Xrate = IF(MAX('00-Bad_ Debt_Invoices'[CURNCYID]) = "USD",1, LOOKUPVALUE('00-Bad_Debt_MC'[XCHGRATE],'00-Bad_Debt_MC'[CURNCYID],Max('00-Bad_ Debt_Invoices'[CURNCYID]),'00-Bad_Debt_MC'[EXCHDATE],MAX('Calendar'[Date])))

 

then the totals are completely wrong.

 

I HATE DAX!!!!!

 

Hello Vvelarde,

 

Thanks, but everything just turns to 0 if I add a number, or if I use a 1 the entire sum balance is incorrect.

 

01.png 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.