The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Dear community,
I have the following data in my data-table (daily_trade_data) (values changed):
Trading Date | Trading Contract | Settlement Price |
1/1/23 | Month | 50 |
1/1/23 | Week | 40 |
1/2/23 | Month | 53 |
1/2/23 | Week | 38 |
.... (until today)
In my report I have a table that shows the user just the todays values:
Trading Date | Trading Contract | Settlement Price |
8/28/23 | Month | 73 |
8/28/23 | Week | 58 |
I would like to select a row (for example the month contract) and a graph should show me the price development for this contract since the start of the year. Currently the graph shows just the todays price - which makes sence - but I struggle with finding the correct dax formula that ignores the date filter in the table and uses an own one.
Thanks for your help!
Luca
Solved! Go to Solution.
Hey Rico, thanks for your help! You gave me the idea to this solution: I created a second date table as you did and added it to the visual. So now I have the table and the visual with two different date-tables. When I now select a product in the table the visual gets filtert to this contract but the dates are not changed.
Luca
Hi @Anonymous ,
As far as I know, if the date column is related to the columns in your visual, your visual will be filtered.
Here I suggest you to create two unrelated dimtables to help your calculation.
My Data model:
Measure:
Filter =
IF (
ISFILTERED ( DimContract[Trading Contract] ),
IF (
YEAR ( MAX ( 'Table'[Trading Date] ) ) = YEAR ( TODAY () )
&& MAX ( 'Table'[Trading Contract] )
= SELECTEDVALUE ( DimContract[Trading Contract] ),
1,
0
),
IF ( MAX ( 'Table'[Trading Date] ) = TODAY (), 1, 0 )
)
Add this measure into visual level filter and set it to show items when value = 1. Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey Rico, thanks for your help! You gave me the idea to this solution: I created a second date table as you did and added it to the visual. So now I have the table and the visual with two different date-tables. When I now select a product in the table the visual gets filtert to this contract but the dates are not changed.
Luca
User | Count |
---|---|
14 | |
12 | |
8 | |
6 | |
5 |
User | Count |
---|---|
29 | |
19 | |
13 | |
8 | |
5 |