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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Power BI DAX

=num( sum({<forecast_type={'dispatches-fcst_ship'},cm={'1'},intercompany_flag=,fiscalmonth=,fiscalquarter=,fiscalyear=>}FORECAST_AMOUNT) ,'#,##0') 

 

 

What will this QlikView calculation be in Power BI? 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

It is because that you are filtering "fact_all" table,but you wanna get the {cm} value which is in "Master_Calendar" table,you'd better use "lookupvalue()"function or "related()" function.

Below are the references:

https://dax.guide/lookupvalue/

https://dax.guide/related/

 

 
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

View solution in original post

11 REPLIES 11
harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

Try this measure

Measure= 

var a = CALCULATE (SUM (Table [FORECAST AMOUNT]) , FILTER (Table, Table [Forecast_Type] = "dispatches-fcst_ship" && Table [CM] = 1))

 

RETURN

 

FORMAT(a,"#,##0")

 

Pull the Date from the Date Table and this measure.

 

The row context will take care of the sums by Fiscal Dates.

 


Regards,

Harsh Nathani


Appreciate with a Kudos!! (Click the Thumbs Up Button)

Did I answer your question? Mark my post as a solution!

 

 

Anonymous
Not applicable

Hello,

 

What do you mean by 'Pull the Date from the Date Table and this measure'? 

 

 

Hi @Anonymous ,

 

 

Drag the column and measures to the Visualization Pane.

 

1.jpg

 

 


Regards,

Harsh Nathani


Appreciate with a Kudos!! (Click the Thumbs Up Button)

Did I answer your question? Mark my post as a solution!

Anonymous
Not applicable

Hello,

 

I understand that but why will I need to add this 'Table [CM] = 1))' into the calculation?

 

Thanks for you help so far!

Hi @Anonymous ,

 

Is CM a Column in your table

 

Are you not calculating amount where CM = 1.

 

If not , please explain what your Qlik function is doing.

 

Thanks

HN

Anonymous
Not applicable

Chin_IT_0-1594897440745.png

 

I have used your calculation for myself and this is what I have done. There is an error which is why I was not sure why that was needed. 

 

Hi @Anonymous ,

 

It is because that you are filtering "fact_all" table,but you wanna get the {cm} value which is in "Master_Calendar" table,you'd better use "lookupvalue()"function or "related()" function.

Below are the references:

https://dax.guide/lookupvalue/

https://dax.guide/related/

 

 
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

Hi @Anonymous ,

 

What does "cm={'1'}" refer to in your original post?

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Anonymous
Not applicable

I think cm is calendar month but abbreviated to cm. But I am not 100% certain what cm refers to in the original post. 

Hi  @Anonymous ,

 

Better first confirm cm,if it refers to a column,I think what suggested by @harshnathani  is a right solution.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

 

Anonymous
Not applicable

Power BI issue.PNG

CM is a column in the master_calendar table as you can see

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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