FORMAT - DAX Guide

preview_player
Показать описание
FORMAT: Converts a value to text in the specified number format.

This video is part of DAX Guide, the online guide to all the DAX functions, with links to related content and compatibility matrix with all the versions of Power BI, Azure Analysis Services (AAS), SQL Server Analysis Services (SSAS), SQL Server Data Tools (SSDT), and Power Pivot for Excel.


#dax #powerbi #ssas #tabular #analysisservices #powerpivot
Рекомендации по теме
Комментарии
Автор

Thank you. What is the use case of fixed (data type) ?

Bharath_PBI
Автор

Very useful function and like always, a quality explanation !!!

joaquimcosta
Автор

..looking forward to =FORMAT(2;"[t]:mm") --> "48:00" ... as in Excel.

holahandstrom
Автор

Thanks a lot! I find it unfortunate that this DAX function does't respect culture for numeric values.
Is it possible to change thousand seperator from comma to period + decimal seperator from period to comma?
This ofcourse, without converting to string and just replacing.

pietjehans
Автор

I think you can pass a fourth argument to format text, you just put any text to replace the original one, and if you want to use the original text in the expression you put @. In excel you can even pass a color by name for the third first arguments, but unfortunately that is not supported in power bi

BernatAgulloRosello
Автор

is it possible to convert to a percentage and still use it for future calculations with numbers? I ask this because it becomes text and it is impossible to reuse it for calculation

diegomex
Автор

thank you for your videos.
I have a question:
How can I use this to check if a phone number is valid (xxx-xxx xxxx) ?,
my solution was to use the mid and len functions and comparing each number, but this approach is very long

hichamkabel
Автор

I am using "FORMAT" dax function for calculating percentages in Live Connection reports using SSAS Cubes, but I am getting a duplicate rows for category calumns in the table visual. The formula looks like this.
Percentage = FORMAT(Divide((Count_Yes), (Total_Count), 0), "Percent")
My Columns in Table for example:-
Emp_Name Location Count_Yes Percentage.
I am getting the repeated values for Emp_Name and Location even they are no values for count_yes column.
Please help me as i am not getting the solution for this from many days and I didn't find solution anywhere.

ramanachandaka
Автор

What about filter context using this function? It completely destroy it. Thanks for sharing!

DanielMelo
Автор

This function doesn't really act as expected.
For instance; I have a visual with a values and future dates. The rows/columns with future dates will not be displayed, because the result is BLANK. But, once I add the FORMAT funtion to the values, all future dates are shown in the visual as blank rows/columns.

Additionaly; even when using numeric formatting in measures used in graphs, it will give an error that appears like it tries to do a conversion. "sampleaxiswithlocalminmax function requires measure parameter () ti be numeric column reference from the specified table"

pietjehans
join shbcf.ru