Forum Discussion
Vendor Statement of Account
Hi, nadir ,
According to your description, if you want to create a dynamic calculated table based on the slicer, I am afraid that it is not supported in power bi becasue not like measures, the calculated column/table is calculated during database processing (such as data refresh) and then stored in the model , They will not respond to user choices on the report.
One way to create a new table that meets your requirements is that you can create a calculated table like this and need to manually change the date in the filter formula as needed.
Table =
VAR tab1 =
FILTER (
ALL ( 'Vendor Statement' ),
'Vendor Statement'[Date] >= DATE ( 2016, 1, 1 )
&& 'Vendor Statement'[Date] <= DATE ( 2016, 12, 31 )
)
VAR tab2 =
FILTER (
ALL ( 'Vendor Statement' ),
NOT (
'Vendor Statement'[Date] >= DATE ( 2016, 1, 1 )
&& 'Vendor Statement'[Date] <= DATE ( 2016, 12, 31 )
)
)
VAR _row =
ROW (
"Vendor ID", MAXX ( tab2, [Vendor ID] ),
"Name", MAXX ( tab2, [Name] ),
"Doc Number", "Summarize doc",
"Date", MAXX ( tab2, [Date] ),
"Description", MAXX ( tab2, [Description] ),
"Opening Balance", SUMX ( tab2, [ Opening Balance] ),
"Debit", SUMX ( tab2, [Debit] ),
"Credit", SUMX ( tab2, [Credit] ),
"net change", SUMX ( tab2, [net chamge] ),
"Ending balance", SUMX ( tab2, [Ending balance] )
)
RETURN
UNION ( tab1, _row )
Attached a sample file in the below, hopes to help you.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks
Really appreciate your response and help but this will be a sort of static data and report where the consumer of the report can not select a different date than what is already specified in the new created table , the issue here is that this statement should be printed for a different date selection everytime.
Regards
Nadir
- v-yingjl5 years ago
Community Support
Hi nadir ,
As I previous posted, power bi could not support create dynamic calculated table based on selected slicer.
Please refer:
- Dynamic Table based on Slicers
- Based-on-slicer-selection-create-dynamic-calculated-table-in-power-bi
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.