Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi everyone,
I'm working on a Power BI report where I have two tables: Base and Promotions. The Base table includes sales, profitability, and cost data for all products by day and by branch, while the Promotions table includes similar data but only for products that are part of specific promotions. The tables are linked by the column LOCCOD-SKU-DATE, which is a concatenation of the columns LOCCOD (Branch code), SKU (Product code), and DATE.
I want to create a slicer to select a promotion (ProCod) from the Promotions table and have this filter the Base table to show only the relevant products and branches included in the selected promotion. I want to leave the date without filtering so users can compare those same products and branches in a time period where there was no promotion.
Thanks in advance for your help!
Solved! Go to Solution.
Hi @Matth_P ,
I created some data:
Base:
Promotions:
Here are the steps you can follow:
1. Create measure.
Flag =
var _select=SELECTEDVALUE('Promotions'[ProCod])
var _date=SELECTCOLUMNS(FILTER(ALL('Promotions'),'Promotions'[ProCod]=_select),"date",'Promotions'[Date])
RETURN
IF(
MAX('Base'[Date]) in _date,1,0)
2. Place [Flag]in Filters, set is=1, apply filter.
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Matth_P ,
I created some data:
Base:
Promotions:
Here are the steps you can follow:
1. Create measure.
Flag =
var _select=SELECTEDVALUE('Promotions'[ProCod])
var _date=SELECTCOLUMNS(FILTER(ALL('Promotions'),'Promotions'[ProCod]=_select),"date",'Promotions'[Date])
RETURN
IF(
MAX('Base'[Date]) in _date,1,0)
2. Place [Flag]in Filters, set is=1, apply filter.
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
User | Count |
---|---|
123 | |
77 | |
62 | |
50 | |
49 |
User | Count |
---|---|
175 | |
125 | |
60 | |
60 | |
58 |