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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Msk_2080
Frequent Visitor

Pareto chart

Hi, I am trying to create a pareto chart using the calcualted measure. Below is the code used to create the chart but by using the calculated columns. How to use the same code to with calculated measure for claims cost?

Pareto Part Cost =
var totalgrwt = CALCULATE(sum('Claims_Data'[Claims cost]),ALLSELECTED('Claims_Data'))
var currentgrwt = sum('Claims_Data'[Claims cost])
var summarizedtable = SUMMARIZE(
ALLSELECTED('Claims_Data'),
'Claims_Data'[item_desc_plus],
"grtwt" , sum('Claims_Data'[Claims cost])
)
var cumu_sum = sumx(
filter(summarizedtable, [grtwt] >= currentgrwt),
[grtwt])
return
cumu_sum/totalgrwt
1 ACCEPTED SOLUTION
v-xiaotang
Community Support
Community Support

Hi @Msk_2080 

Can we close this thread now if there is no other question? It would be nice if you can accpet my answer as the solution. Thanks 🙂

 

 

Best Regards,

Community Support Team _ Tang

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

View solution in original post

4 REPLIES 4
v-xiaotang
Community Support
Community Support

Hi @Msk_2080 

Can we close this thread now if there is no other question? It would be nice if you can accpet my answer as the solution. Thanks 🙂

 

 

Best Regards,

Community Support Team _ Tang

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

Msk_2080
Frequent Visitor

Hi ,

What i meant was insteat of using the calculated column sum('Claims_Data'[Claims cost]), can a measure be used here.

I am trying to use the below measure which is calculated based on two different tables linked to each other.

CPV_Retail_Service = (DIVIDE([YTD Total cost service],[Average parc retail])*12)/[Months elapsed 1]
I want to used this CPV_Retail_Service in the Pareto chart code above to create the pareto chart. But it is not giving the correct chart.
But when i use the standard Pareto visual i am getting the chart created but it is limiting to top 10 products only which is not correct.
 

Hi @Msk_2080 

Thanks for your reply.

 

Where do you want to put the measure? In the calculate() function or the sum() function? This can be viewed in the DAX tutorial, if the parameter is an expression, you can put the measure into it. 

 

However, as for whether the expected results can be obtained, it depends on some factors, such as the nested measure should consider the context of the environment in which it is nested... Well, it would be better to understand this principle by example.

 

 

 

Best Regards,

Community Support Team _Tang

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

v-xiaotang
Community Support
Community Support

Hi @Msk_2080 

Because not having sample data to test the result, so I  just rename your code and put it in measure, surprisingly, it works fine and no error prompt,

vxiaotang_0-1634190739621.png

 

 

Best Regards,

Community Support Team _Tang

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.