cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
aignn
Helper II
Helper II

How create new table from another table with dax and filter? (like ALL)

Hello!

 

I have two tables.

Table1 and Table2

Table1 have filter by column Date.

I want create new table with dax (like ALL) ,which will have the same columns and rows from Table1, but where Date is less than selected in filter.

 

How can this be done? Thanks in advance

6 REPLIES 6
mwegener
Super User
Super User

Hi @aignn ,

 

has your question been answered?

 

Regards,

Marcus

Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener work at KUMAVISION AG , one of the world's largest
implementation partners for Microsoft Dynamics. #
"Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


mwegener
Super User
Super User

Hi @aignn ,

 

making a copy of a table is easy.

 

Table2 = Table1

 

https://docs.microsoft.com/en-us/power-bi/desktop-calculated-tables

But calculated tables are calculated during the data load.

Slicers only work in the evaluation context.

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener work at KUMAVISION AG , one of the world's largest
implementation partners for Microsoft Dynamics. #
"Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Hi! @mwegener 

 

Thank you for your reply.

My example - https://yadi.sk/d/WOB5pcfXT3yT-A

I want get data for chart where Date < selected in slicer Date 

 

what i have:

test2-1

 

what i need:

test2-2

Hi @aignn ,
Could you tell me if your problem has been solved? If it is, kindly accpect the helpful answer as a solution. Welcome to share your own solution. More people will benefit from here. If you are still confused about it, please share more details to us.

 

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @aignn ,

Calculated table is static. If you want to create a table based on the selected value dynamically, it is impossible. If you just want to show those values, you could create a measure like below:

Measure =
VAR a =
    SELECTEDVALUE ( 'Date'[Date] )
RETURN
    IF (
        ISFILTERED ( 'Date'[Date] ),
        CALCULATE ( SUM ( 'Table'[Minutes] ), FILTER ( 'Table', 'Table'[Date] < a ) ),
        SUM ( 'Table'[Minutes] )
    )

3.PNG

Please show more details and screenshots if I misunderstand.

 

 

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @aignn 

 

can't you use the date slicer Before?

Before.png

If I answer you question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener work at KUMAVISION AG , one of the world's largest
implementation partners for Microsoft Dynamics. #
"Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors