Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi All,
Really hope someone is able to guide me with my problem here. In my scenario, every item is sourced from different vendors.
Ask here to find price difference between lowest and highest sourcing.
ex:
| item | actual_price_inr |
| 110370 | 553 |
| 110370 | 600.53 |
| 110370 | 656.59 |
| 110370 | 656.6 |
| 214860 | 1738 |
| 214860 | 1839 |
| 214860 | 1910 |
will return
| item | L1Price | H1Price | H1L1Diff | DiffFlag |
| 110370 | 553 | 656.6 | 19% | 11-19% |
| 214860 | 1738 | 1910 | 10% | 0-10% |
Now I want this Diff flag wise count of items like
| DiffFlag | Count of items |
| 11-19% | 1 |
| 0-10% | 1 |
But when I take DiffFlag wise count of items, everything goes for a toss.
Following are my measures
L1Price =
VAR current_row_item = MIN(purchase_history_metric[item])
VAR current_row_category = MIN(purchase_history_metric[category])
RETURN
CALCULATE(
MIN(purchase_history_metric[actual_price_inr]),
FILTER(
ALL(purchase_history_metric),
purchase_history_metric[actual_price_inr]>0&&
purchase_history_metric[item] = current_row_item&&
purchase_history_metric[category] = current_row_category
)
)
H1L1Diff = divide(purchase_history_metric[H1Price]-purchase_history_metric[L1Price],purchase_history_metric[L1Price])
H1L1Flag = if(purchase_history_metric[H1L1Diff]<=0.1,"0-10%",IF(purchase_history_metric[H1L1Diff]<=0.2,"11-20%",BLANK()))
Please help
@amitchandak @Ashish_Mathur @SpartaBI @MFelix
Hi, @ey_jitendra
Your field [actual_price_inr] seems to be missing data, can you provide your demo for testing?
Best Regards,
Community Support Team _ Eason
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!