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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Filtering DAX variable

Hi! I have a DAX statement like this :

 

"VAR _road = RST[road]
VAR _section = RST[section]
VAR _dist = RST[distance]

VAR _COMPARISON = CALCULATE(SUM(RST[edgedropoffdepth]); FILTER(RST; RST[distance] = _dist && RST[road] = _road && RST[section] = _section && RST[runname] = 41)) 

 

RETURN
RST[edgedropoffdepth] - _COMPARISON"

 

So basically I have the same road/section/distance and I'd like to compare how the value has changes. Is it somehow possible to but a value for this "VAR _FIRST", if there is no value with desired distances, road, section and runname. So is there a possibility to add somekind of IF statement (or something else).

1 REPLY 1
Anonymous
Not applicable

Hello @Anonymous 

 

Take a look at this article. It contains some great tips for getting your question answered quickly.

 

 https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Thanks for being part of the community!

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.