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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
kalyanil
New Member

Dynamic Data shapping

Hi,

I'm trying to shape the data and arrive at the DAX to calculate the Variance column. 

PBI.PNG

1. Budget is the base column

2. Based on the filter selection Submission Month, I should show sum(Volume)

3. All the category of Submssion months and the Volume will be in same column

4. If I select Mar from the slicer Submission month, then Budget (Volume) - Mar(Volume)

5. If I select Jan from the slicer Submission month, then Budget(Volume) - Jan(Voume)

6. It should be dynamic

7. Every month the monthly dataset will be appended

8 REPLIES 8
v-yuta-msft
Community Support
Community Support

@kalyanil ,

 

Create a measure using dax as below:

Result = CALCULATE(SUM('Table'[Volme]), FILTER(ALL('Table'), 'Table'[Submission Month] = "Budget")) - CALCULATE(SUM('Table'[Volme]), ALLSELECTED('Table'))

Capture.PNG 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you for sharing me the DAX. This works 50%, because whenever I select the Month from the filter the Budget value is also getting changed along with the Month selection value. But the Budget value should remain as 1000 and only the month value should change in the table.

@kalyanil ,

 

I'm confused on your description, could you please show the expected result?

 

Regards,

Jimmy Tao

Greg_Deckler
Community Champion
Community Champion

If you are just summing up all of Budget or Month and it does not matter the individual rows this might be OK, Typically though you would have Budget and Monthly data in separate tables.

You should be able to do something like:

Measure =
VAR __Budget = SUMX(FILTER(ALL('Table'),[Submission Month] = "Budget",[Volume])
VAR __Month = SUM('Table'[Volume])
RETURN
__Budget - __Month


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

This is not working, I'm getting the total sum value irrespective of the month values.

Thank you for yor reponse. But one question, in the DAX, you are summing up all the volume in the Month right?

 

But, the sum(Volume) should depend on the filter selection. Ex., if I select Jan from filter then Budget(volume)-Jan(volume), if I select Feb from the filter then Bedget(Volume)-Feb(Volume).

 

Please help me to understand this.

I will try this today and let you know. thank you

amitchandak
Super User
Super User

@kalyanil , is this the base data. It does not seem like the correct data model. Budget as word and month in same column

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

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.