Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi,
I'm connecting to fabric warehouse through symantic layer (direct query option). I've a Dim_date and fact_bid_offer where it had relationship as below.
I've a date slicer as below on the report view.
I am trying to create a summary table named "Int A" based on the date filtered. But it didn't work as expected.
Intl A =
Var st_date =MIN(DIM_DATE[CALENDAR_DATE_SHORT_NAME])
Var en_date = MAX(DIM_DATE[CALENDAR_DATE_SHORT_NAME])
RETURN SUMMARIZE(CALCULATETABLE(FACT_BID_PER_OFFER, FACT_BID_PER_OFFER[INTERVAL_DATE] >= st_date, FACT_BID_PER_OFFER[INTERVAL_DATE] < en_date), FACT_BID_PER_OFFER[STATION_NAME], "bid_vol", [BID_VOL])
I want the table to be refreshed based on my change on the slicer but it doesn't. I need this summary table to do further calculation. Is that something doable in power bi?
Solved! Go to Solution.
@amitchandak Thanks for your contribution on this thread.
Hi @Laiq_Rahman ,
As @amitchandak says, the data in the calculated table will not be changed by the user interactions(filter, slicer and so on). You can follow the steps below to get it:
1. Create a measure as below
Flag =
VAR st_date =
MIN ( DIM_DATE[CALENDAR_DATE_SHORT_NAME] )
VAR en_date =
MAX ( DIM_DATE[CALENDAR_DATE_SHORT_NAME] )
VAR idate =
SELECTEDVALUE ( FACT_BID_PER_OFFER[INTERVAL_DATE] )
RETURN
IF ( idate >= st_date && idate < en_date, 1, 0 )
2. Create a table visual with the necessary fields in the table 'FACT_BID_PER_OFFER' (include the field [INTERVAL_DATE]) and apply a visual-level filter with the condition (Flag is 1)
If the above ones can't help you figure out, please provide some raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And it is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi,
I removed the date relationship as shown above on my screenshot. I've added start date and end date parameter. Then bind those parameters to work from power query.
So, no more date column on my output. Whenever user select the dates then a direct query runs with those dates instead of doing summarize table. This works to some extent.
Another issue, when i use parameter on the slicer then it doesn't let me to use the generic date slicer settings like between, relative options but that's a different issue which i need to think about how to resolve this.
Thanks guys.
Hi,
I removed the date relationship as shown above on my screenshot. I've added start date and end date parameter. Then bind those parameters to work from power query.
So, no more date column on my output. Whenever user select the dates then a direct query runs with those dates instead of doing summarize table. This works to some extent.
Another issue, when i use parameter on the slicer then it doesn't let me to use the generic date slicer settings like between, relative options but that's a different issue which i need to think about how to resolve this.
Thanks guys.
@amitchandak Thanks for your contribution on this thread.
Hi @Laiq_Rahman ,
As @amitchandak says, the data in the calculated table will not be changed by the user interactions(filter, slicer and so on). You can follow the steps below to get it:
1. Create a measure as below
Flag =
VAR st_date =
MIN ( DIM_DATE[CALENDAR_DATE_SHORT_NAME] )
VAR en_date =
MAX ( DIM_DATE[CALENDAR_DATE_SHORT_NAME] )
VAR idate =
SELECTEDVALUE ( FACT_BID_PER_OFFER[INTERVAL_DATE] )
RETURN
IF ( idate >= st_date && idate < en_date, 1, 0 )
2. Create a table visual with the necessary fields in the table 'FACT_BID_PER_OFFER' (include the field [INTERVAL_DATE]) and apply a visual-level filter with the condition (Flag is 1)
If the above ones can't help you figure out, please provide some raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And it is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi @amitchandra
That calculated table doesn't have date field. The reason is the actual fields are calculating average, median, mean etc., When we add dates then the final value slightly differs from what is expected. Any other work around we have.
@Laiq_Rahman , Calculated Tables can not use slicer values. You need join the new table back with date and use in visual to get filters
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
116 | |
98 | |
87 | |
35 | |
35 |
User | Count |
---|---|
152 | |
98 | |
81 | |
61 | |
55 |