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.
Hi all,
I have transaction of product and its multi level product group, each product line has quantity which I want to sum it to its uppler product group. The condition of sum is if product has same UoM (unit of measurement like KG, TON, BOX), sum it to product group but if not same UoM, give zero to product group.
The picture of sample data and expected result below may help to describe my problem
I am trying to use SUM, EARLIER to solve but seems no luck
sum2 = SUMX(FILTER(txn,(txn[UNIT]=EARLIER(txn[UNIT]))&&txn[L7]=EARLIER(txn[L7])),txn[QTY])
Please kindly help to enlight me. Thank you
Solved! Go to Solution.
You may add measures as follows.
QTY2 = IF ( DISTINCTCOUNT ( txn[UNIT] ) = 1, SUM ( txn[QTY] ), 0 )
UNIT2 = IF ( DISTINCTCOUNT ( txn[UNIT] ) = 1, MAX ( txn[UNIT] ), "NA" )
You may add measures as follows.
QTY2 = IF ( DISTINCTCOUNT ( txn[UNIT] ) = 1, SUM ( txn[QTY] ), 0 )
UNIT2 = IF ( DISTINCTCOUNT ( txn[UNIT] ) = 1, MAX ( txn[UNIT] ), "NA" )
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
96 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
88 | |
63 |