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
siddharth_dixit
New Member

Caluculate Va;ues on the basis of values of other column

Hi All, 

 

I am new to powerbi and need help in creating a dax. My data looks like:

Fiscal YearCol 1 Col 2Total offtake YA
FY17-18AABC533
FY17-18ADEF1264
FY17-18AGHI1974
FY17-18BABC1424
FY17-18BDEF1677
FY17-18BGHI1864
FY18-19AABC832
FY18-19ADEF26
FY18-19AGHI1799
FY18-19BABC736
FY18-19BDEF1748
FY18-19BGHI1481

 

Now I want to sum "Total Offtake MSU YA" only for Col2 = "ABC" and for each FY. Is it possible to store it in a measure or repeat the same value in each row corresponding to that FY?

1 REPLY 1
Nathaniel_C
Community Champion
Community Champion

Hi @siddharth_dixit ,
Not exactly clear what you are asking for because the column header does not match the request. Total offtake YA<> sum "Total Offtake MSU YA" only for Col2 = "ABC" and for each FY. 
However if that is just a typo, then try this:
myTable is the table name I used.
Create a measure.

Sum of Total offtake YA = SUM(myTable[Total offtake YA])

Create a second measure.

Sum of ABC per FY = 
CALCULATE([Sum of Total offtake YA], ALLEXCEPT(myTable,myTable[Fiscal Year]),myTable[Col 2]= "ABC")

Apply the second measure to your visual
FY ABC.PNG

 


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
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 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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