Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello Everyone,
I have one Fact_weight Table and a Dim_Date Table. Here the Dim_Date Datekey is connected with DateInKey column from Fact_weight.
I have a slicer from DimDate which uses start date and end date. As Start Date i set 01/01/2023 and end Date i set 28/02/2023.
My Goal is to get sum of Weight where DateIn >=01/01/2023 & DateIn <=28/02/2023, and DateOut >28/02/2023.
Both the filters should be correct and if there is any entry where both filters are true, then i want sum of those weights.
here in Table the last 2 entries satisfy the filter hence the result i want is 2.4+3.4 =5.8
I want Result to show in Table and the table has following columns.
Date (Dim_Date)
Weight(Fact_weight)
DateIn(Fact_Weight)
DateOut(Fact_weight).
Here because i am using Date(Dim_Date) as a column, the second criteria of filter (DateOut >28/02/2023) is just ignored.
Here is the Measure which i used :
I would really appreciate if anyone can help me with this Problem. Thanking you in advance :))
Fact_Weight
Dim_Date
Solved! Go to Solution.
Hi @Anonymous ,
I have created a simple sample, please refer to my pbix file to see if it helps you.
Use a date table that is not related to the Fact_weight Table and put the date table into the slicer.
Measure =
VAR _maxdate =
MAXX ( ALLSELECTED ( dim_date ), dim_date[Date] )
VAR _mindate =
MINX ( ALLSELECTED ( dim_date ), dim_date[Date] )
RETURN
CALCULATE (
SUM ( 'Table'[weight] ),
FILTER (
ALL ( 'Table' ),
'Table'[Date in] >= _mindate
&& 'Table'[Date in] <= _maxdate
&& 'Table'[date out] >= _maxdate
)
)
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
I have created a simple sample, please refer to my pbix file to see if it helps you.
Use a date table that is not related to the Fact_weight Table and put the date table into the slicer.
Measure =
VAR _maxdate =
MAXX ( ALLSELECTED ( dim_date ), dim_date[Date] )
VAR _mindate =
MINX ( ALLSELECTED ( dim_date ), dim_date[Date] )
RETURN
CALCULATE (
SUM ( 'Table'[weight] ),
FILTER (
ALL ( 'Table' ),
'Table'[Date in] >= _mindate
&& 'Table'[Date in] <= _maxdate
&& 'Table'[date out] >= _maxdate
)
)
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Thank you so much for the reply and yes it worked. I changed the measure a bit and got the desired Result. I am writing the new Measure and also attaching the result which i wanted. Thank you 🙂
This is the new Measure
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
33 | |
21 | |
20 | |
14 | |
12 |
User | Count |
---|---|
28 | |
18 | |
16 | |
16 | |
14 |