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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Pikachu-Power
Impactful Individual
Impactful Individual

Simplify Measure

Hello,
 
I have a measure in the following form:
 
KeyFigure1_Period1_Period2 = ([Sales_Period1] / [Quantity_Period1]) * ([Quantity_Period2] - [Quantity_Period1])
 
I have 12 different KeyFigures and 3 Periods of interest (Period1 --> Period2, Period2 --> Period3, Period3 --> Period4)... makes total 36 measures i have to create. Are there some DAX techniques to simplify that?
 
Many thanks for new ideas 🙂
3 REPLIES 3
mahoneypat
Microsoft Employee
Microsoft Employee

Please share example data, as maybe a change to your data model would simplify analysis.  If still needed, you could probably crank out your measures faster in Tablular Editor.  But here is one suggestion to improve the measure you've shown.  It will improve performance by calculating each only once, and should be easier to copy/paste to create similar measures.

 

KeyFigure1_Period1_Period2 =
var _sales1 =[Sales_Period1]
var _qty1 = [Quantity_Period1]
var _qty2 = [Quantity_Period2]
Return
(_sales1/_qty1) * (_qty2 - _qty1)
 
Regards,
Pat




Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


amitchandak
Super User
Super User

@Pikachu-Power , Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

Not getting an idea of why you need to create measures for 12 period ?

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

i have no output yet but i will show all measures in a matrix. the enduser can choose the periods

 

Period1 --> Period2 or

Period2 --> Period3 or

Period3 --> Period4

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.