Reply
Frequent Visitor
Posts: 2
Registered: ‎01-02-2019

Replace a table value with another based on a specific date (when refreshing or publishing)

Hi everyone,

 

I am new to the bi platform and I am trying to figure out a way to combe three different reports (daily,weekly,monthly) into one. The reports are more or less the same besides some values.

 

My question has two parts:

 

a) Is there any way to automatically replace one or more values of a visual (for example table) in my report based on the date?

 

For example if I have a table with values (v1, v2, v3), I would like - automatically - to replace v3 with v4 based on the date (for example if it is Monday)?

 

b) Is there any way to completely replace a visual (for example a table) with another based on the date (for example every Friday)?

 

Any possible solution/idea, is much appreciated!

Thanks 

Community Support Team
Posts: 7,505
Registered: ‎08-14-2016

Re: Replace a table value with another based on a specific date (when refreshing or publishing)

Hi @Stathis,

 

First, you can't replace existing table records in dataview level, you need to go to query editor or change them on datasource side.

I'd like to suggest you to take a look at following link about dynamic attribute based on slicer, it should suitable for your requirement.

Dynamic Attributes In A Power BI Report

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |
Frequent Visitor
Posts: 2
Registered: ‎01-02-2019

Re: Replace a table value with another based on a specific date (when refreshing or publishing)

@v-shex-msft

Xiaoxin Sheng,

Thank's a lot for your reply. It really helped me understand Dynamic Attributes based on a slicer.
 
I tried to add to the dynamic slicers time intervals (day-week-month) and in this way to combine 3 different reports (daily-weekly-monthly) into one (this is my purpose).

This method, includes the creation of a table with static time intervals day,week,month (month=30 days), and I have the above limitations:
1) Changing the output of a visual: I would like to automatically demonstrate 2 basic metrics in my daily report, 3 metrics (the 2 basics plus 1 new) in my weekly report, and 4 metrics in monthly report. The purpose here is the columns of my visualization (matrix) to be adjusted by the choice of the slicer.
2) If I set up dynamic time slicers (for example month) the time interval is inaccurate in most cases (closing months are 28-31 days so the selection of 30 days is inaccurate).


Any extra help will be much appreciated!
Best Regards,
Stathis

Community Support Team
Posts: 7,505
Registered: ‎08-14-2016

Re: Replace a table value with another based on a specific date (when refreshing or publishing)

Hi @Stathis,

 

#1. I'm not so clearly for this requirement, can you please explain more detail?
#2. You can try to use date function to manually define dynamic month range.

 

For example:

Replace Column =
VAR currDate = xxx //specific date
RETURN
    CALENDAR (
        DATE ( YEAR ( currDate ), MONTH ( currDate ), 1 ),
        DATE ( YEAR ( currDate ), MONTH ( currDate ) + 1, 1 )
            - 1
    )

 

Above formula will dynamic get accurate month range based on inputted date dynamic.

 

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |