This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hello Community -
I am in need of some help writing a calculation item within my calculation group. I currently have a calc group with 4 items in it and then it is pulled into a matrix against some of my base measures (as rows).
Here are calculation item DAX measures:
YTD =
CALCULATE ( SELECTEDMEASURE(), DATESYTD ( Date_Table[Date] ) )
PYTD =
VAR _YTD = CALCULATE ( SELECTEDMEASURE(), DATESYTD ( Date_Table[Date] ) )
RETURN CALCULATE ( SELECTEDMEASURE() , SAMEPERIODLASTYEAR ( Date_Table[Date] ) )
YoY Value =
VAR _CY = selectedmeasure()
VAR _LY = calculate ( selectedmeasure(), sameperiodlastyear(Date_Table[Date]))
RETURN _CY - _LY
YoY % =
VAR _CY = selectedmeasure()
VAR _LY = calculate ( selectedmeasure(), sameperiodlastyear(Date_Table[Date]))
VAR _YoY = _CY - _LY
RETURN DIVIDE(_YoY,_LY,0 )
Now I am trying to created a calculation item that will give me the COUNT of the customers that had YoY growth > 0 and a calculation item that will SUM the growth of those customers (for Sales, GP1 and Lines only).
If I create this basic measure, I get the output that I want, but I cannot add it to my matrix as a column (next to my calculation item measures).
Lines Up = CALCULATE(
COUNTROWS( SUMMARIZE('Master_Tbl','Master_Tbl'[Customer])),
FILTER( SUMMARIZE('Master_Tbl','Master_Tbl'[Customer] ), [YoY Lines] > 0 )
)
How can I replicate the above measure as a calcluation item for only Sales, GP1 and Lines, leaving all other row measures in my matrix blank?
Your help is always appreciated!
Ryan
@ryan_b_fiting , I think, very similar to YOY.
example
Lines Up =
VAR _CY = selectedmeasure()
VAR _LY = calculate ( selectedmeasure(), sameperiodlastyear(Date_Table[Date]))
VAR _YoY = _CY - _LY
CALCULATE(
COUNTROWS( SUMMARIZE('Master_Tbl','Master_Tbl'[Customer])),
FILTER( SUMMARIZE('Master_Tbl','Master_Tbl'[Customer] ), _YoY > 0 )
)
@amitchandak thanks for the reply. I have already tried that, but that does not work. That gives me the same value across all base measures, and it does not allow me the 'BLANK' value measures that I do not want to see YoY count for (only want to see it for Sales, Lines, GP1)
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 36 | |
| 28 | |
| 28 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 68 | |
| 39 | |
| 33 | |
| 24 | |
| 23 |