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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Rakesh_508
Frequent Visitor

undefined

HI

 

Rakesh_508_0-1715179450577.png

 

 

I do have a scenario where I have used Field parameter in the Rows of a matrix visual.
I do have a year column in columns of a matrix which has values of 2023,2024,2025..(2024 future data +2025 data is coming from forecast table and 2023 and 2024 upto date  data is coming from actual table) 
I do have Goal and completed measures in the values section to show the Goal and completed values of the rows section based on year including actual and future values.
my requirement is that I want to show the sum of total values of 2023,2024,2025 as a seperate column and pecentages of goal and completed of the total as a seperate column..
I have tried enabling column subtotal to show summation of all those above years but its showing 0 value.

5 REPLIES 5
Rakesh_508
Frequent Visitor

@v-tianyich-msft 
Please see the below measures which used in the matrix table

 

Goal measure=

var currentyear=selectedvalue(DateTable[Year])
var Actual=Calculate(Countrows(ActualTable),ActualTable[Year]=currentyear)+0
Forecast=Calculate(countrows(ForecastTable),Year(ForecastTable[NextDueDate])=currentyear)+0
return
Actual+Forecast

 

Completed measure=

var currentyear=selectedvalue(DateTable[Year])
var Actual=Calculate(Countrows(ActualTable),ActualTable[Year]=currentyear,ActualTable[Status]="Completed")+0
Forecast=0
return
Actual+Forecast

Hi @Rakesh_508 ,

 

Your requirement is to calculate the sum, why use countrows, try using the sum function

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

@v-tianyich-msft 

I tried and could not able to use sum insted of countrows....Can you please help me out on Goal and Completed measures using sum???

Hi @Rakesh_508 ,

 

Please share your sample data in text form.

 

Best regards,
Community Support Team_ Scott Chang

v-tianyich-msft
Community Support
Community Support

Hi @Rakesh_508 ,

 

Do you use the min function in your measure, please provide sample data and your measure expression.

 

Best regards,
Community Support Team_ Scott Chang

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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