Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Creating a dynamic table only with years to use with Parameter

Hi

 

Im working with PBI Desktop connected to SSAS Server.

I want to create a dynamic table with just the year of a specific date column columnC from factualA, to use it as a source in a report parameter.

 

I can do this, right?

Conceptually this should be done at the SSAS Project level, not PBI, correct?

 

I'm seeing ADDVALUES, SUMMARIZE, SELECTVALUES, CALCULATETABLE... what is the most efficient way 

to simply create a table in SSAS, with the distinct year values of same date column?

 

I was trying to do = ADDCOLUMNS (VALUES(YEAR(FactualF[columnC])) but it isn't working.

 

Regards

 

3 REPLIES 3
v-lili6-msft
Community Support
Community Support

hi,@Ricardo

    When you use live connection to connect SSAS Server, there is no sense in which a new model is being created; in other words, it's not possible to define new calculated columns, hierarchies, relationships, and so on.

You can only create report level measure.

So you can create a table in SSAS like below:

= VALUES(FactualF[columnC].[Year])

 

Best Regards,

Lin

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

Hi
this didn't work. 
= VALUES(FactualF[columnC].[Year])

 

I had to create in FactualF a year calculated column, and then

=VALUES(FactualF[Year])

but i think this is not efficient and a lost of space.

 

Can i combine VALUES with YEAR function?

 

Regards

hi,@Ricardo

     Create in FactualF a year calculated column, and then use =VALUES(FactualF[Year]) is the efficient way.

Combine VALUES with YEAR function is also run YEAR function and the run Values function. So it is the best way for you. 

 

Best Regards,

Lin

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.