Create Static Tables in DAX Using the DATATABLE Function

  Рет қаралды 32,559

SQLBI

SQLBI

Күн бұрын

Пікірлер: 36
@ariarc
@ariarc Жыл бұрын
It's been more than two years since this video was made and posted, and yet I haven't seen anyone explain static tables in DAX so clearly and thoroughtly. And believe me, I have looked far and wide. Thank you.
@CJ-jc8tn
@CJ-jc8tn 3 жыл бұрын
Thank you Alberto for sharing different ways to create static tables. I wasn't aware of the DATATABLE function and will definitely use this approach going forward. Another SQLBI video, another nugget of knowledge learned !
@davidirias3459
@davidirias3459 3 жыл бұрын
You really are the master of masters in POWERBI!!!! Ver helpful.
@jaimeildefonsosegurapena7328
@jaimeildefonsosegurapena7328 3 жыл бұрын
You could also add a M expression: = Table.FromRows( { {"LOW", 0, 000}, {"MEDIUM", 100, 1000}, {"HIGH", 1000, 99999} }, type table [#"Price Range" = text, #"Min Price" = number, #"Max Price" = number] )
@SQLBI
@SQLBI 3 жыл бұрын
Good point - you have to open the M editor to do that, you cannot use a calculated table in that case.
@stevemorrison9144
@stevemorrison9144 3 жыл бұрын
You have been really great for a novice user ..many thanks
@ThepExcel
@ThepExcel 3 жыл бұрын
Thx for so many choices explained
@gondebas
@gondebas 3 жыл бұрын
By your leave, master Alberto, you can give names to columns without SELECTCOLUMNS, as simple as that: DATATABLE ( "RangeName", STRING, "Price_Min", INTEGER, "Price_Max", INTEGER, { { "Low" , 1 , 10 }, { "Midium" , 10 , 10 }, { "High" , 100 , 1000 } } )
@SQLBI
@SQLBI 3 жыл бұрын
The example with SELECTCOLUMNS uses another syntax - table constructor - which create a table using dynamic expressions (not allowed in DATATABLE) but cannot control the column name directly.
@advent7324
@advent7324 2 жыл бұрын
Excellent info on creating tables. Thanks
@MrSimp75
@MrSimp75 Жыл бұрын
Hello Alberto- How can one create user defined functions in SSAS cube to be used in DAX query. Something like inbuilt function like DATEVALUE() etc.
@OnoDus
@OnoDus 3 жыл бұрын
Thank you Alberto! Great content
@rokiczaaa
@rokiczaaa Жыл бұрын
How to do similar table but with measures? I have to combine some measures to create a chart
@braveheart3917
@braveheart3917 2 жыл бұрын
Nicely explained
@JS-ts2vv
@JS-ts2vv 3 жыл бұрын
Thank you Sir, I was trying using this way as part of the Selector value to switch between two different measures using two different time attribute (activating by userelationship) to dimdate table. however, it doesnt work as plan. I have tried both using IF and SWITCH with no luck. the scenario is to have a chart that can show volumes either by Fiscal Year or Standard Year base on the selector. Would really appreciate your advise here and thanks in advance for the support!
@joaovasconcelos5360
@joaovasconcelos5360 Жыл бұрын
Excellent!
@manjun1892
@manjun1892 3 жыл бұрын
Really helpful content.Thanks Alberto.
@kalinduSekara
@kalinduSekara 3 жыл бұрын
Simple but very useful
@pmsocho
@pmsocho 3 жыл бұрын
Thanks for the video!
@RM-wz2ug
@RM-wz2ug 2 жыл бұрын
Hello Alberto and thank you for sharing so much of your knowledge. I am relatively new to PBI but have learned a great deal from your videos. I have a challenge for which I can find no solution and wondering if you have ideas. I find myself with an inventory source that does not have a date/time stamp. The data is simply current data based on the latest transactions from the source system so I don't believe I can use incremental refresh. I need to figure out how to create a snap shot of this data each Friday. I am refreshing the data daily and trying to find a way to capture and keep a snapshot with the Friday Date/Time stamps so that I start building a history of inventory as of Friday's each week in a single table. The intent is to create visuals (eventually) that compares current inventory to year ago, month ago, etc. Ideas?
@SQLBI
@SQLBI 2 жыл бұрын
There are examples of similar scenarios in our book: www.sqlbi.com/books/analyzing-data-with-microsoft-power-bi-and-power-pivot-for-excel/ And course: www.sqlbi.com/p/data-modeling-for-power-bi-video-course/
@advrohitowhal9794
@advrohitowhal9794 3 жыл бұрын
THANKS !
@tameraziz2104
@tameraziz2104 3 жыл бұрын
Thank you.. Alberto, I have a real case which requires me to create a dynamic table coming from measures. Any possible way?
@SQLBI
@SQLBI 3 жыл бұрын
A measure can return only a scalar value (string, number). You can create tables in variables within the DAX expression of a measure, but you cannot return them from a measure.
@papachoudhary5482
@papachoudhary5482 3 жыл бұрын
Thanks! Sir
@Bharath_PBI
@Bharath_PBI 3 жыл бұрын
Thank you 👍
@Phoenixspin
@Phoenixspin 3 жыл бұрын
Thanks, great information.
@davidtawa8338
@davidtawa8338 3 жыл бұрын
Thxs!!
@BernatAgulloRosello
@BernatAgulloRosello 3 жыл бұрын
What about loading an excel file? You just need to modify the excel and refresh the table 😊 and you can create calculated columns (like a dynamic max value) workout trouble
@BernatAgulloRosello
@BernatAgulloRosello 3 жыл бұрын
Then again, not as instant as a dax expression I know, and if a new column appears it breaks everything. Plus and cons as usual
@Alpacastan21m
@Alpacastan21m 3 жыл бұрын
How can we use data table but use measures and dynamic formulas instead of static data?
@SQLBI
@SQLBI 3 жыл бұрын
Use the table constructor instead: dax.guide/op/table-constructor/ Then use SELECTCOLUMNS to control column names.
@BryanBonjour
@BryanBonjour 3 жыл бұрын
thanks
@amarnadhgunakala2901
@amarnadhgunakala2901 3 жыл бұрын
That's cool stuff
@ashishmohan4707
@ashishmohan4707 3 жыл бұрын
Hi very useful video and very practical need everyone for every project ......very big thanks to share with us. If it can possible can you plzz provide us excel data file which you used. Very greatful for us...👌👌👌👌👌👌👌👌💐💐💐💐🎂🎂🎂🎂🎂🎂🎂🎂🎂🎂🎂🎂
@SQLBI
@SQLBI 3 жыл бұрын
You can download the sample files following the link in the video description.
Lookup multiple values in DAX
22:10
SQLBI
Рет қаралды 53 М.
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 26 МЛН
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 56 МЛН
Интересно, какой он был в молодости
01:00
БЕЗУМНЫЙ СПОРТ
Рет қаралды 3,8 МЛН
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 21 МЛН
Propagating filters using TREATAS in DAX
19:18
SQLBI
Рет қаралды 46 М.
Table.TransformColumns in Power Query | Super Function ⚡
18:50
Row Context in DAX
20:42
SQLBI
Рет қаралды 103 М.
Introducing DEFINE TABLE in DAX queries
12:53
SQLBI
Рет қаралды 11 М.
📊 How to use Power BI DAX - Tutorial
37:28
Kevin Stratvert
Рет қаралды 1,1 МЛН
Optimizing nested iterators in DAX
17:31
SQLBI
Рет қаралды 22 М.
Using RELATED and RELATEDTABLE in DAX
18:04
SQLBI
Рет қаралды 43 М.
How and why to Create VIRTUAL TABLES in DAX Formulas
18:48
Nestor Adrianzen
Рет қаралды 19 М.
How to use Microsoft Power Query
16:35
Kevin Stratvert
Рет қаралды 2,1 МЛН
Using GENERATE and ROW instead of ADDCOLUMNS in DAX
12:26
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 26 МЛН