cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Niiru1
Helper IV
Helper IV

Create DAX Table with Decimal point Integers

I'm trying to create a table via DAX that will use latitudes and longitudes as integers however when I enter that values only whole numbers are available but I need decimal values x5 or x6.

 

Niiru1_0-1629972871830.png

 

 

 

I know I can "Enter Data" or "connect to Excel csv" file but the particular problem I'm working on requires a DAX table to be created in this fashion.

 

I have also followed other advice tips to change numbers into decimal numbers, not summarized and data category classifications as "latitude" and "longitude" respectively

 

My formula is: 

Test Coordinates = 
DATATABLE(
"Latitude",INTEGER,
"Longitude",INTEGER,
"Nod",INTEGER,
"Ion",INTEGER,
"Address",STRING,
{
{48.858242,2.2949378,31,1,"Address 1"},
{38.89773,-77.03653,32,2,"Address 2"},
{51.499447,-0.124759,33,3,"Address 3"},
{52.51622,13.37765,34,5,"Address 4"}
}
)

https://www.dropbox.com/s/7mo46b7z590zuuh/LatLongFix.pbix?dl=0

 

 

 

1 ACCEPTED SOLUTION
v-caitlyn-mstf
Community Support
Community Support

Hi @Niiru1 ,

 

Please try the dax below:

 

Test Coordinates = 
DATATABLE(
    "Latitude",DOUBLE,
    "Longitude",DOUBLE,
    "Nod",INTEGER,
    "Ion",INTEGER,
    "Address",STRING,


    {
        {48.858242,2.2949378,31,1,"Address 1"},
        {38.89773,-77.03653,32,2,"Address 2"},
        {51.499447,-0.124759,33,3,"Address 3"},
        {52.51622,13.37765,34,5,"Address 4"}
    }
)

 

here is my test result:

vcaitlynmstf_1-1630319808040.png

 

 

 

Hope it helps,


Community Support Team _ Caitlyn Yan

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
v-caitlyn-mstf
Community Support
Community Support

Hi @Niiru1 ,

 

Please try the dax below:

 

Test Coordinates = 
DATATABLE(
    "Latitude",DOUBLE,
    "Longitude",DOUBLE,
    "Nod",INTEGER,
    "Ion",INTEGER,
    "Address",STRING,


    {
        {48.858242,2.2949378,31,1,"Address 1"},
        {38.89773,-77.03653,32,2,"Address 2"},
        {51.499447,-0.124759,33,3,"Address 3"},
        {52.51622,13.37765,34,5,"Address 4"}
    }
)

 

here is my test result:

vcaitlynmstf_1-1630319808040.png

 

 

 

Hope it helps,


Community Support Team _ Caitlyn Yan

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

amitchandak
Super User
Super User

@Niiru1 , Create with ROW and union after that mark this column category as long/lat

 

example

union(

ROW("Month", 1),
ROW("Month", 2),
ROW("Month", 3)
)

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors