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.
Hi,
I want to sum a column values of one table based on applying filters on another table column. I tried the below one but it is not working. Can you please assist.
Solved! Go to Solution.
Hi, @Himanshi0291
DAX is the language you use when you create transformations in the Power BI Desktop main screens rather than via the query editor. While M is the query language that can be viewed in the Power Query Editor. This query editor is accessed using the Edit Queries button in Power BI Desktop. It has no effect on the date type in 'Query Editor'. The aggregation calculation should work for numeric columns. You need to modify the data type as 'decimal number'. As a workaround, you may also use Value Function to Converts a text string that represents a number to a number.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
you forgot the closing parethesys ")"
Over Time = CALCULATE(SUM(DK_Time_Temp[OvtHrs]), FILTER(DK_Projects, LEFT(DK_Projects[WBS1], 1 ) <> "0" ) )
Hi,
Thanks for your reply on this. The problem that I am facing with this query is that SUM function isnt working with column name "OvtHrs' that has data type 'Text'. There is no visualization and it says " SUM function cannot work with values of type String". If I change the data type to "Decimal number' in my table, What impacts do i keep in mind?
- Does it permanently change the data type in the database?
- Will it corrupt the figures already saved in this column in the table?
Please help.
Thanks.
Hi, @Himanshi0291
DAX is the language you use when you create transformations in the Power BI Desktop main screens rather than via the query editor. While M is the query language that can be viewed in the Power Query Editor. This query editor is accessed using the Edit Queries button in Power BI Desktop. It has no effect on the date type in 'Query Editor'. The aggregation calculation should work for numeric columns. You need to modify the data type as 'decimal number'. As a workaround, you may also use Value Function to Converts a text string that represents a number to a number.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |