Forum Discussion
Re:
- 3 years ago
Hi,
I am not sure how your datamodel looks like, but please check the below picture and the attached pbix file.
It is for creating a measure.
I hope the below can provide some ideas on how to create a solution for your datamodel.
Expected output: = VAR _productAcondition = CALCULATE ( SUM ( Data[Quantity] ), Package[Product Name] = "Product A" ) <> 0 VAR _productBcondition = CALCULATE ( SUM ( Data[Quantity] ), Package[Product Name] = "Product B" ) <> 0 VAR _productCcondition = CALCULATE ( SUM ( Data[Quantity] ), Package[Product Name] = "Product C" ) <> 0 VAR _productDcondition = CALCULATE ( SUM ( Data[Quantity] ), Package[Product Name] = "Product D" ) <> 0 RETURN IF ( HASONEVALUE ( User[User] ), _productAcondition * _productBcondition * _productCcondition * _productDcondition ) - 3 years ago
Update:
Already have the answer but kinda complicated.
the idea is to create multiple var to count the products
and then return it using floor
return
floor(item(1)+item(2)+....+Item(n),n)/n - 3 years ago
Hi,
Thank you for your message, and please check the below picture and the attached pbix file.
I tried to create a sample pbix file like below.
Hi,
Thank you for your message, and please check the below picture and the attached pbix file.
I tried to create a sample pbix file like below.
Thank you so much for helping me getting be better on dax. really appreciate it