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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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