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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
arulsettu
Frequent Visitor

Fixed in power bi

HI,

 

   I am very new to power bi. acutally i am trying to convert TABLEAU app into power bi.

 

in a chart there is caluclated dimension created as below

 

{ FIXED [Year Week]: MAX([End Time])}

 

 

Year Week is year and week from a date field

 

so to do this power bi i did as follows

 

Year Week = FORMAT([end_time].[Date],"yyyy")&WEEKNUM([end_time].[Date],2)  ---> in text format

 

And for { FIXED [Year Week]: MAX([End Time])} i did below

 

CALCULATE(MAX([end_time].[Date]),ALL(Year Week))   ---->date format

 

but not getting the output

 

can anyone help me on this

 

7 REPLIES 7
Anonymous
Not applicable

Hi, 
I'm very new to tableau, 
I'm migrated this form of tableau for Power BI 

in a collum of table there is calculated dimension created as below


Vda Forn Cat
{ FIXED [Regiao IM], [Nome Fabricante], [Nome Categoria], [Mercado] : SUM([Vendas Valor])}

so to do this power bi i did as follows:

Metrics = CALCULATE([Vendas Valor Cat]; ALLEXCEPT(DIM_CATEGORIA_AGREG;DIM_CATEGORIA_AGREG[REGIAO_IM];DIM_CATEGORIA_AGREG[NOME_FABRICANTE];DIM_CATEGORIA_AGREG[NOME_CATEGORIA];DIM_CATEGORIA_AGREG[MERCADO]))


 

 

Greg_Deckler
Super User
Super User

I believe what you want is:

 

CALCULATE(MAX([end_time].[Date]),ALLEXCEPT([Year Week])) 

My understanding of FIXED is that it in your case your formula will calculate MAX of [End Time] in the context of [Year Week] regardless of any other dimensions in the view.

 

The equivalent of that should be ALLEXCEPT in that ALLEXCEPT removes all context other than those specified in the function. 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Thanks for the reply

 

by using this

 

CALCULATE(MAX([end_time].[Date]),ALLEXCEPT('table_name',[Year]))

 

i am getting only one value 

 

31/dec/2016

 

 

and above calcluation i am using as dimension.

 

can you check this

 

 

Thanks

Hi @arulsettu,

 

>>i am getting only one value 

If you only drag this measure to a visual, you will get the max date. You can add other columns to work through this issue.

 

Regards,

Xiaoxin Sheng

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

i am using this as dimension

 

CALCULATE(MAX([end_time].[Date]),ALLEXCEPT('table_name',[Year]))

 

and 

 

count(value)

 

so where and what should i add as anew column

 

Hi @arulsettu,

 

You should add a index column to let the measure calculate loop the table.

 

For example:

 

Capture.PNGCapture2.PNG

 

Notice: Count(value) will summarize this field

 

Regards,

Xiaoxin sheng

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

i am doinglike below is this correct

 

Thanks

Capture.JPG

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.