scalar value
2 TopicsPareto values used in a text box (scalar values)
Hello community, hope someone can help me before my head explodes. I searched for days now, but could not find an answer. Here is the challenge: I am working on a pareto chart, which wasn't that complicated to create a table and a chart out of it (see attached PBIX with demo data), thanks to some awesome guys and their videos. Pareto Running Total ParetoTest RT simple = CALCULATE([Paretotest Total Sales], FILTER( ALL( ParetoTestData[Customer]), sum(ParetoTestData[Amount]) <= [Paretotest Total Sales])) Pareto % RT Paretotest RT % simple = DIVIDE([ParetoTest RT simple],[Paretotest total All Sales],0) Now I want to put this information in a text box saying: "In the country XYZ, n out of m customers (20%) made A USD (80% of total sales of B USD)" The easy ones are: m = all customers (in this country) B = all sales in this country But I also need the scalar values for n and A: n = Count of customers which represent A = 80% of the sales (and this value should be the calculated pareto running total, not simply 80% of the sales) In my example the text card should say: "In country XYZ 2 customers (20% of customers) represent 35300 USD (81.0% of sales)". Please ignore the country selection for now to make it as simple as possible. Hope someone really smart can help me ..... please Thanks Benedikt https://app.powerbi.com/view?r=eyJrIjoiODQzOWJiZDItODY2Yy00Y2UwLTlmNDQtY2E3ZDk4NGIwOGU2IiwidCI6IjU0OGVmYThjLWI1MzEtNDRjOS05MGY4LTAzZDc4MTdkMzdmZSJ9Solved2.3KViews0likes8CommentsIm having troubles with my switch in DAX
Hi Guys, Im a beginner with DAX and what I dit wrong. This is my error message: The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value. And this is my code: CountFalse = SWITCH( IF( FILTER(Table1,[CheckColumn2] = "NO"), COUNT(Table1[Column2]), BLANK() ), IF( FILTER(Table1,[CheckColumn9] = "NO"), COUNT(Table1[Column9]), BLANK() ), IF( FILTER(Table1,[CheckColumn15] = "NO"), COUNT(Table1[Column15]), BLANK() ), IF( FILTER(Table1,[CheckColumn18] = "NO"), COUNT(Table1[Column18]), BLANK() ) ) I want this code to count all the NO's in Table1. Multiple Columns have a NO so Im using a switch to count them all. Does someone know how I can make this work or do this in a easier way? Thanks!Solved1.1KViews0likes4Comments