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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
sarath_chandra
Helper III
Helper III

Looking for diff of two random values by applying filters

Hi all, please help me for solution.

kindly see the data set . there is cycle column with Q1,Q2,Q3. with ID , Amount column

I need difference of two cycle (which i'm selecting in filter) higher cycle will be base in difference

i attached dax, power bi view images also. 

Dax which previously tried showing the difference(q3-q2-q1) which is working while im selecting q3 and q2 or q3 and q1.

but if im selecting q2 and q1 in filter . it should show q2 - q1 as answer. but this dax showing ( -q2-q1). here q2 should be base in difference.

please help me out ?

highly appreciate for solution 

This is the data set image. I need the difference of any two cycle while selecting the cycle filter(q1,q2,q3,q4)This is the data set image. I need the difference of any two cycle while selecting the cycle filter(q1,q2,q3,q4)this is the dax one which tried earlier. in this dax it is giving (highest  cycle q4 is base  (its giving difference of q4-q3-q2-q1) but  if im selecting q3 qnd q2 in filters , it should show q3- q2 (but here it giving -q3-q2)this is the dax one which tried earlier. in this dax it is giving (highest cycle q4 is base (its giving difference of q4-q3-q2-q1) but if im selecting q3 qnd q2 in filters , it should show q3- q2 (but here it giving -q3-q2)for example, if im selecting q1 and q2 in filter , it should the difference(q2-q1) ...not like -q2-q1..please help me in this ..for example, if im selecting q1 and q2 in filter , it should the difference(q2-q1) ...not like -q2-q1..please help me in this ..

2 REPLIES 2
sarath_chandra
Helper III
Helper III

Hi @Xiaoxin Sheng , Thanks for your reply, But I need difference , should be in dynamic calculation in accordance with filter selection. 

Thanks a lot for your further reply 

can you please help me in this?

Anonymous
Not applicable

HI @sarath_chandra,

According to your description, it seems like you want to measure calculate with multiple aggregations.

For this scenario, I'd like to suggest you refer to Greg’s blog to use summarize function to apply the first level aggregation and use iterator function sumx to apply the second level aggregate.

Measure Totals, The Final Word 

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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