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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Summing a DAX/quick measure with column values, possible ?

Hello Community,

 

We have a table with:
Month      Qty
202001     1

202002     2

202003     3

 

In that table, we have created a quick measure that is a DAX formula. This DAX formula sums Qty before 2020 and returns one value.
Now, suppose the result of the DAX formula is 4.  I want to have a new column "Final Qty" whose value is 4 + 1 = 5 for 202001, 4 + 2 for 202002 and 4 + 3 = 7 for 202003.

 

Table would eventually looks like:

Month     Qty     DAX     Final Qty

202001    1         4          5

202002    2         4          6

202003    3         4          7

 

(   not much DAX / PBI experience I must say 🙄 but been lurking around  )

 

Thx for shedding some lights, for the sake of my hairs 😉

 

Brgds,

Olivier

8 REPLIES 8
Anonymous
Not applicable

Table is not a table visual, it's a table available as follow in the Data Table Tool:

Table in Data Tool.jpg

 

The table visual in Reportin tool:

Table visual in Report toolTable visual in Report tool

 

On left, a Card visualization showing Qty "before" = 3.

On right, the table visual where I would like to add "3" to all Running Total value.
So 2019 10 = 4 (1+3), 2019 11 = 4 (1+3), 2019 12 = 2 (-1+3), 2020 01 = 3 (0+3), and so on...

FinalTotal=CALCULATE([Opend Before Reorting Period],ALLSELECT())+[Running Total]

AlB
Community Champion
Community Champion

Hi @Anonymous 

I assume that by "table" you mean a table visual. If so, 

1. Place Month in the visual, as you already had

2. Create a explicit measure for the Qty and place it in the visual:

 

QtyMeasure =  SUM(Table1[Qty])

 

3. Place your DAX measure in the visual, as you already had

4. Create this measure (simply the sum of the two previous ones) and place it in the visual:

 

Final Qty = [QtyMeasure] + [Your DAX Measure]

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

Anonymous
Not applicable

When used in formula, my DAX measure is = 0/blank/empty 😞

Hi @Anonymous ,

 

Your measure [Opened Before Reporting period] is taking into account the filter context created in your Table visualization by placing the YYYYMM in the rows.

 

Regards,

 

If this post answered your question, please mark it as a solution to help other users find useful content.
Kudos are another nice way to acknowledge those who tried to help you.

J. Payeras
Mallorca, Spain
amitchandak
Super User
Super User

@Anonymous , if you have created a measure then you need to create a mesure. You can not use measure in a new column

 

1. You create a measure

measure =
var _1 = [Qty before 2020]
return
sum(Table[Qty]) +1

 

2. You create a column

new column =
var _1 = [Qty before 2020]
return
(Table[Qty]) +1

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Fowmy
Super User
Super User

@Anonymous 

Not sure how your measures are built, but you can dimple added two measures:

Final Qty = [DAX] + sum(Table[Qty])

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

When using my DAX measure in formula, it's always empty. And when diplaying it in a Card visualization, I can see its value though.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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