March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi everyone.
here is the situtation. I have a table that displays the total # of stems counted,
it also includes the croparea, or the amount of space each plant resides
I calculate the number of stems per sq meter using the following formula,
Total Stems/ crop area
example 8519/143= 59.57
these caluclation work fine, the issue is when you view more then one crop at a time.
I use a slicer called crop to filter the table, I have select 2 crop types, Amuse and Bison
Amuse has 8519 stems, and a crop area of 143sqm
Bison has 7254 stems, and a crop area of 143sqm
Amuse 8519 / 143 = 59.57
Bison 7458 / 143 = 52.19
combine values
stems = 15623
crop area = 286
15623 / 286 = 54.625 stems per sq meter
the results do not calculate properly in the table
it adds the stems properly to 15623, and the crop area of 286 but sum the stems per meter giving a total of 111.73. this is not correct
Solved! Go to Solution.
Hi @FCF ,
You can refer to this post:
Power BI (DAX) – Quick Tip – How to count how many items are selected on a Slicer.
I create an example.
Sum = SUM('Table'[Sales])
Product Slicer Count =
CALCULATE (
COUNTROWS ( FILTERS ( 'Table'[Product] ) ),
ALLSELECTED ( 'Table' )
)
Average = DIVIDE([Sum],[Product Slicer Count])
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @FCF ,
You can refer to this post:
Power BI (DAX) – Quick Tip – How to count how many items are selected on a Slicer.
I create an example.
Sum = SUM('Table'[Sales])
Product Slicer Count =
CALCULATE (
COUNTROWS ( FILTERS ( 'Table'[Product] ) ),
ALLSELECTED ( 'Table' )
)
Average = DIVIDE([Sum],[Product Slicer Count])
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hi
is there not a way to count the # of items selected in a slicer. ????
Your formula should be like
Formula = divide(sum(Total Stems),sum(crop area))
Not like
Formula = sumx(table,Total Stems/crop area)
Means, first aggregate and then divide
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.
My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
Hi thanks for your suggestion, but when i use the following
TotalActual = Divide(sum([total]);syn([croparea])
i get an incorrect result.
i want the results to be divided by the number of crops selected in the slicer, in this instance it is 2
regards
Ideally the selected values should filter, if the tables are joined.
Check that filter is passing to that region.
It should one ot the two bar graphs(icon). when you select slicer.
hi
thanks for the reply, but i am using a basic slicer
I want to count the # of items selected in the slicer, in this example it is 2
Regards
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
168 | |
116 | |
63 | |
57 | |
50 |