id stringlengths 7 11 | source stringclasses 1
value | category stringclasses 11
values | title stringlengths 15 214 | text stringlengths 70 30.5k | url stringlengths 57 160 | tags stringlengths 3 113 | created_at int64 1.22B 1.79B |
|---|---|---|---|---|---|---|---|
se_78561472 | stackoverflow | DATA_SCIENCE | Plotting an aging SSP using for loops | Plotting an aging SSP using for loops
I have a bunch of FITS files for different star types which each have flux and wavelength column. I have found their main-sequence lifetimes and their weighted ratio of each spectral class with respect to mass to the total sample. I have also found the total weighted flux for each... | https://stackoverflow.com/questions/78561472/plotting-an-aging-ssp-using-for-loops | python, data-analysis, astronomy | 1,717,177,132 |
se_44327999 | stackoverflow | DATA_SCIENCE | How to merge multiple dataframes | How to merge multiple dataframes
I have different dataframes and need to merge them together based on the date column. If I only had two dataframes, I could use df1.merge(df2, on='date'), to do it with three dataframes, I use df1.merge(df2.merge(df3, on='date'), on='date'), however it becomes really complex and unread... | https://stackoverflow.com/questions/44327999/how-to-merge-multiple-dataframes | python, pandas, dataframe, merge, data-analysis | 1,496,403,486 |
se_78551755 | stackoverflow | DATA_SCIENCE | Loading & Analyzing Big Data from a CSV in R | Loading & Analyzing Big Data from a CSV in R
Please forgive me if this is a duplicate or poorly written. I can't seem to find the resources I need.
I have a two-terabyte CSV that I need to analyze in R in various ways, but I am unsure how to load this amount of data for analysis. To be clear, I don't need help ana... | https://stackoverflow.com/questions/78551755/loading-analyzing-big-data-from-a-csv-in-r | r, bigdata, data-analysis | 1,717,013,420 |
se_78546860 | stackoverflow | DATA_SCIENCE | How to add a color-coded line with extra information | How to add a color-coded line with extra information
I intend to make a plot of Suspension Travel x Distance of a train. I have a dataset with these information and with information relating if the train is in a straight track or in a curve. I want to mimic the following image, but I have some additional information I... | https://stackoverflow.com/questions/78546860/how-to-add-a-color-coded-line-with-extra-information | python, matplotlib, jupyter-notebook, data-analysis, ipywidgets | 1,716,941,560 |
se_78548503 | stackoverflow | DATA_SCIENCE | Histogram of Location of Rows that contain missing values | Histogram of Location of Rows that contain missing values
I'm try to create a histogram of location of rows that contain missing values for House-Prices-Advanced-Regression-Technique using this approach on python.
Following is the histogram that I want
But when I try to do train.isnull().sum(axis=1).plot(kind='hist',... | https://stackoverflow.com/questions/78548503/histogram-of-location-of-rows-that-contain-missing-values | python, histogram, data-analysis | 1,716,974,188 |
se_78544331 | stackoverflow | DATA_SCIENCE | Excel Pivot Table Calculation | Excel Pivot Table Calculation
I want to make some calculations on my pivot table.
In the pivot table side, I have year-by-year sales income and amount for each product.
I want to see the differences between products year by year. For example, in 2024 I sold 1000 amount apples, previous year (2023) I sold 500 amount of... | https://stackoverflow.com/questions/78544331/excel-pivot-table-calculation | excel, pivot-table, data-analysis | 1,716,901,836 |
se_78389170 | stackoverflow | DATA_SCIENCE | How to replace a column value with a value from dictionary based on another column value | How to replace a column value with a value from dictionary based on another column value
I have the following Data Frame:
ID Unique_value
red_1 0
red_2 1
blue_1 1
blue_2 2
blue_3 2
blue_4 3
blue_4 1
There a... | https://stackoverflow.com/questions/78389170/how-to-replace-a-column-value-with-a-value-from-dictionary-based-on-another-colu | python, pandas, dataframe, numpy, data-analysis | 1,714,120,246 |
se_78522031 | stackoverflow | DATA_SCIENCE | Gaussian fit with gap in data | Gaussian fit with gap in data
I would like to fit a gaussian on an absorption band, in a reflectance spectra. Problem is, in this part of the spectra I have a gap in my data (blank space on the figure), between approximately 0.85 and 1.3 µm. I really need this gaussian, because after this I would like to compute spect... | https://stackoverflow.com/questions/78522031/gaussian-fit-with-gap-in-data | python, data-analysis, curve-fitting, scipy-optimize | 1,716,455,474 |
se_78519754 | stackoverflow | DATA_SCIENCE | Discrepancy in PySpark Query Results Compared to SQL Query on Open-Source Dataset | Discrepancy in PySpark Query Results Compared to SQL Query on Open-Source Dataset
I am encountering an issue with a PySpark query that I'm running on an open-source dataset located at "/databricks-datasets/learning-spark-v2/sf-fire/sf-fire-calls.csv".
The query aims to retrieve records from the year 2018 and order the... | https://stackoverflow.com/questions/78519754/discrepancy-in-pyspark-query-results-compared-to-sql-query-on-open-source-datase | sql, apache-spark, pyspark, databricks, data-analysis | 1,716,407,888 |
se_78477839 | stackoverflow | DATA_SCIENCE | Python Multiprocessing of an object method | Python Multiprocessing of an object method
I have a python code that operates on measurements of devices. In one section, I have to apply a matching network to the measurement. I am handling everything related to rf measurement with Scikit Rf module and I am creating a circuit with the stuff I need, and then extract t... | https://stackoverflow.com/questions/78477839/python-multiprocessing-of-an-object-method | python, multiprocessing, data-analysis | 1,715,686,896 |
se_78510216 | stackoverflow | DATA_SCIENCE | I have two measures in PowerBi - one that calculates the number and one the percent. How can I concatenate please to show e.g. "3 (3.9%") | I have two measures in PowerBi - one that calculates the number and one the percent. How can I concatenate please to show e.g. "3 (3.9%")
I would like to concatenate the two measures below please to show a number then the percentage in brackets on a card in Power BI.
NumberWithin3Days = DIVIDE([AdmissionsWi... | https://stackoverflow.com/questions/78510216/i-have-two-measures-in-powerbi-one-that-calculates-the-number-and-one-the-perc | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,716,276,051 |
se_78489419 | stackoverflow | DATA_SCIENCE | DAX expression to get previous years averages | DAX expression to get previous years averages
I am having a problem to calculate previous years averages of a column
I have tried below DAX:
Average_Prev_Three_Years_DA_Per_Date-2 =
VAR PresentYear = YEAR(TODAY())
RETURN
ADDCOLUMNS(
FILTER(
ALL('Summary Table'),
YEAR('Summary Table... | https://stackoverflow.com/questions/78489419/dax-expression-to-get-previous-years-averages | powerbi, dax, data-analysis | 1,715,857,673 |
se_78492511 | stackoverflow | DATA_SCIENCE | I am trying to install the necessary packages on miniconda, by using the command: "(base) $ conda create -y -n pydata-book python=3.10" | I am trying to install the necessary packages on miniconda, by using the command: "(base) $ conda create -y -n pydata-book python=3.10"
(base) $ conda create -y -n pydata-book python=3.10
this gives me a message: "-y" is not recognized as an intern or extern command by executables lotes
is it a problem or ... | https://stackoverflow.com/questions/78492511/i-am-trying-to-install-the-necessary-packages-on-miniconda-by-using-the-command | conda, data-analysis | 1,715,894,369 |
se_78492094 | stackoverflow | DATA_SCIENCE | XGBoost Time Series Diff Feature | XGBoost Time Series Diff Feature
Let's suppose I have day 1,2,3,4 and want to predict day 5:
Features = Weekday, Diff
Target = Value
Weekday: 1,2,3,4,5 | Diff: NaN,40,20,20,(?) | Value: 20,60,80,100,(?)
When I train my model using diff() as feature, it really enhances the results. But what is the purpose of using it, ... | https://stackoverflow.com/questions/78492094/xgboost-time-series-diff-feature | python, data-analysis, xgboost, feature-engineering | 1,715,887,737 |
se_67843385 | stackoverflow | DATA_SCIENCE | Building Heatmap with two separate series having "Year" and "Month" information | Building Heatmap with two separate series having "Year" and "Month" information
I am working on a dataset
d = {'date_added_month': ['February', 'December', 'October', 'December', 'April','December', 'March', 'April'],
'date_added_year': [2014, 2012, 2008, 2009, 2010, 2011, 2012, 2013],
't... | https://stackoverflow.com/questions/67843385/building-heatmap-with-two-separate-series-having-year-and-month-information | pandas, dataframe, seaborn, data-analysis | 1,622,837,193 |
se_78196129 | stackoverflow | DATA_SCIENCE | In Power BI Desktop, is there a way to filter dataset based on filter passed via URL | In Power BI Desktop, is there a way to filter dataset based on filter passed via URL
I have a report built in Power BI Desktop and published in Service that is a DirectQuery (and has to stay that way as the data needs to be refreshed on every change). The table is quite large, and will continue to grow daily. It is ... | https://stackoverflow.com/questions/78196129/in-power-bi-desktop-is-there-a-way-to-filter-dataset-based-on-filter-passed-via | filter, powerbi, dax, data-analysis, powerbi-desktop | 1,710,966,996 |
se_78472330 | stackoverflow | DATA_SCIENCE | Get Earlies & Latest Date per customer - DAX | Get Earlies & Latest Date per customer - DAX
I have two tables connected together by date. I want to create a calculation which will calculate the earlies and the latest date per customer.
First Contact Column = CALCULATE ( MIN(DimDate[Date]), ALLEXCEPT(FctTrc, FctTrc[Customer]) )
I have create a calculation but... | https://stackoverflow.com/questions/78472330/get-earlies-latest-date-per-customer-dax | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,715,604,416 |
se_78471462 | stackoverflow | DATA_SCIENCE | Optimisation in updating of data in dataFrame in python | Optimisation in updating of data in dataFrame in python
Actually i have given a code to optimise such that it will run under 1 min, now running in 5-8 min, i have applied many concepts but unable to optimise the code . So want help in the same.
Problem i discovered is , in loop when we are trying to update dataframes,... | https://stackoverflow.com/questions/78471462/optimisation-in-updating-of-data-in-dataframe-in-python | python, pandas, dataframe, optimization, data-analysis | 1,715,594,301 |
se_78450940 | stackoverflow | DATA_SCIENCE | How to extract time from a dataset | How to extract time from a dataset
I am working on a dataset using SSMS. I am still totally new to SQL—less than a month. But i am grinding hard to make the best out of it.
I am trying to extract time from a dataset so i could determine the peak time of an event. I was able to get the peak time but no time to show the... | https://stackoverflow.com/questions/78450940/how-to-extract-time-from-a-dataset | sql, database, data-analysis | 1,715,198,907 |
se_78448974 | stackoverflow | DATA_SCIENCE | Create a Power BI Measure that counts rows based on values in two columns | Create a Power BI Measure that counts rows based on values in two columns
Very new to Power BI and DAX in particular so this is a pretty basic question...
I would like to create Cards that count the rows in my table that meet criteria across multiple columns. I think creating Measures is the best way to do this, so th... | https://stackoverflow.com/questions/78448974/create-a-power-bi-measure-that-counts-rows-based-on-values-in-two-columns | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,715,175,551 |
se_78442203 | stackoverflow | DATA_SCIENCE | Combining Multiple Page PDF Table Data into a Single DataFrame in Python | Combining Multiple Page PDF Table Data into a Single DataFrame in Python
I have a PDF file containing tabular data spread across multiple pages. The first page of the PDF contains the column headers, while subsequent pages contain rows of data corresponding to those headers. When I use Python and tabula to extract the... | https://stackoverflow.com/questions/78442203/combining-multiple-page-pdf-table-data-into-a-single-dataframe-in-python | python, pandas, data-analysis, tabula | 1,715,082,037 |
se_78426006 | stackoverflow | DATA_SCIENCE | TypeError: 'bool' object is not callable while cleaning Data from excel file | TypeError: 'bool' object is not callable while cleaning Data from excel file
df_dry.dropna(subset=['Quantity', 'Rate'])
I was trying to drop the row if any value from Quantity or Rate was missing, but I'm getting
TypeError Traceback (most recent call last)
Cell In[36], line 1
-... | https://stackoverflow.com/questions/78426006/typeerror-bool-object-is-not-callable-while-cleaning-data-from-excel-file | python, pandas, dataframe, data-analysis | 1,714,755,314 |
se_78424645 | stackoverflow | DATA_SCIENCE | Change Group By in a Power BI Chart | Change Group By in a Power BI Chart
in Power BI, I have a clustered Bar Chart.
By default, it groups by Date. Is there anyway, that I can group all of the "Brand Mentions" together, Domain Mentioned together etc?
I've included a picture (last picture below), where it shows what I'd like it to look like (this was easy... | https://stackoverflow.com/questions/78424645/change-group-by-in-a-power-bi-chart | powerbi, visualization, powerquery, data-analysis, powerbi-desktop | 1,714,738,647 |
se_78411889 | stackoverflow | DATA_SCIENCE | Is there a better way to merge multiple dataframes | Is there a better way to merge multiple dataframes
I have succeeded in making a datatable, in resolution of my last question which got no responses. I still wonder if there is a better way of doing it.
For example, what if i imported all the columns together to make them only one argument in the function, and need i m... | https://stackoverflow.com/questions/78411889/is-there-a-better-way-to-merge-multiple-dataframes | pandas, dataframe, data-analysis | 1,714,534,002 |
se_78404813 | stackoverflow | DATA_SCIENCE | Creating 3 Output Bins In Loops And Range | Creating 3 Output Bins In Loops And Range
I'm new to Data analytics, and i'm trying to create an output of 3 bins in python. I'll have my code attached below. I my getting an output, but its not in 3 bins. Also the bins are as follows:
Question: The function must iterate over the scores in score_list and bin them into... | https://stackoverflow.com/questions/78404813/creating-3-output-bins-in-loops-and-range | python, while-loop, google-analytics, range, data-analysis | 1,714,419,194 |
se_55106786 | stackoverflow | DATA_SCIENCE | SQL Presto Query - Retrieving all possible combinations of rows? | SQL Presto Query - Retrieving all possible combinations of rows?
I am wondering how I can get all possible combinations of a cross joined table to itself?
Sample table looks like
DAY Order pickup_lat pickup_long dropoff_lat dropoff_long created_time
1/3/19 234e 32.69 -117.1 32.63 ... | https://stackoverflow.com/questions/55106786/sql-presto-query-retrieving-all-possible-combinations-of-rows | sql, combinations, data-analysis, presto | 1,552,323,324 |
se_78409620 | stackoverflow | DATA_SCIENCE | Measure to calculate running total per row in PowerBI Matrix | Measure to calculate running total per row in PowerBI Matrix
I have a table with three fields: Year, Period and Product.
Year Period Product
2020 1 A
2020 2 C
2020 3 A
2020 3 B
2020 4 C
2021 2 B
2021 3 C
2021 4 D
2021 1 A
2021 1 C
2022 3 A
2022 4 C
2022 ... | https://stackoverflow.com/questions/78409620/measure-to-calculate-running-total-per-row-in-powerbi-matrix | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,714,491,187 |
se_78407520 | stackoverflow | DATA_SCIENCE | How do I find the correct name in a column with thousands of entries? | How do I find the correct name in a column with thousands of entries?
I am currently learning SQL for data analysis. In today's exercise, I had to answer these questions:
*In 2015, how many people were of the official age for secondary education broken down by region of the world?
For this query, you will need to perf... | https://stackoverflow.com/questions/78407520/how-do-i-find-the-correct-name-in-a-column-with-thousands-of-entries | sql, join, google-bigquery, inner-join, data-analysis | 1,714,468,899 |
se_78386497 | stackoverflow | DATA_SCIENCE | How to regress multiple gaussian peaks from a spectrogram using scipy? | How to regress multiple gaussian peaks from a spectrogram using scipy?
I have this code that aims to fit the data in here DriveFilelink
The function read_file is utilized to extract information in a structured manner. However, I'm encountering challenges with the Gaussian fit, evident from the discrepancies observed i... | https://stackoverflow.com/questions/78386497/how-to-regress-multiple-gaussian-peaks-from-a-spectrogram-using-scipy | python, scipy, data-analysis, curve-fitting, gaussian | 1,714,068,616 |
se_78389010 | stackoverflow | DATA_SCIENCE | Is there a way to force ignore a date value in the dashboard filters? | Is there a way to force ignore a date value in the dashboard filters?
I'm currently working on a dashboard, on Apache Superset 4.0, with multiple and diverse date range.
I need precise filtering so I use jinja templating, which enables me to select the date range on which I'm filtering depending on the chart.
Sadly, w... | https://stackoverflow.com/questions/78389010/is-there-a-way-to-force-ignore-a-date-value-in-the-dashboard-filters | data-analysis, business-intelligence, apache-superset | 1,714,118,254 |
se_78386580 | stackoverflow | DATA_SCIENCE | How to create a basic line chart in Power BI? | How to create a basic line chart in Power BI?
I have a simple table imported from Excel to Power BI with X and Y columns like this.
x|y
2|4
5|6
7|9
Now I want to plot those x,y coordinates ( (2,4); (5,6); (7,9) ) in a chart and draw a line that connects each of them.
But when I select a line chart and drag the Y colu... | https://stackoverflow.com/questions/78386580/how-to-create-a-basic-line-chart-in-power-bi | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,714,069,653 |
se_78369424 | stackoverflow | DATA_SCIENCE | Scipy optimisation doesn't seem to be able to fit correctly | Scipy optimisation doesn't seem to be able to fit correctly
I have two arrays of data, on which I need to fit a nonlinear curve. I am using scipy.optimize and it returns such odd results that when I plot it next to my data points, the curve looks completely wrong. I haven't found anything useful on stackoverflow o... | https://stackoverflow.com/questions/78369424/scipy-optimisation-doesnt-seem-to-be-able-to-fit-correctly | python, scipy, data-analysis, curve-fitting | 1,713,833,777 |
se_76316503 | stackoverflow | DATA_SCIENCE | DAX - Making a calculated column that has another table's value, based on several factors | DAX - Making a calculated column that has another table's value, based on several factors
I am having trouble with a calculated column I am trying to develop.
I have two tables:
(I don't know why the tables aren't displaying properly. It looks fine in preview)
Table A:
PK
Calculated column
1
Value wanted i... | https://stackoverflow.com/questions/76316503/dax-making-a-calculated-column-that-has-another-tables-value-based-on-severa | powerbi, dax, data-analysis, powerbi-desktop, calculated-columns | 1,684,856,350 |
se_78377673 | stackoverflow | DATA_SCIENCE | Can a Power BI calculated column reflect user input? | Can a Power BI calculated column reflect user input?
I'm trying to let a user use a slicer to determine how important something is on a scale of 1-10, which I then want to do various other calculations on within the data table, like multiplying by values to get weighted results.
I can do this in measures using virtual... | https://stackoverflow.com/questions/78377673/can-a-power-bi-calculated-column-reflect-user-input | powerbi, dax, data-analysis, powerbi-desktop, calculated-columns | 1,713,953,969 |
se_78376363 | stackoverflow | DATA_SCIENCE | How to merge two different pbix files having different dataset in single file in power bi desktop | How to merge two different pbix files having different dataset in single file in power bi desktop
is it possible to merge two different pbix files in single pbix file like
customer.pbix and sales.pbix file can be merged and create single file in power bi desktop | https://stackoverflow.com/questions/78376363/how-to-merge-two-different-pbix-files-having-different-dataset-in-single-file-in | powerbi, dax, data-analysis, powerbi-desktop, data-modeling | 1,713,940,366 |
se_78372825 | stackoverflow | DATA_SCIENCE | Previous Week Duration Sum PowerPivot | Previous Week Duration Sum PowerPivot
I need to get the previous week sum total in a column on PowerPivot.
I have tried the below in Both a custom column and as a measure.
my data table has dates, and a duration column as well as a custom WEEKNUM column.
=CALCULATE(
SUM(FAULTDATA[DURATION]),
FAULTDATA[WEEK NUM... | https://stackoverflow.com/questions/78372825/previous-week-duration-sum-powerpivot | excel, powerbi, dax, data-analysis, powerpivot | 1,713,879,615 |
se_78367585 | stackoverflow | DATA_SCIENCE | DAX query: calculating incremental growth of a value by date | DAX query: calculating incremental growth of a value by date
Hi Hoping someone can help me out with this Dax query to create a new column of calculated values in an existing table. I'm trying to add a new column that for each row shows the incremental growth in usage over time for each unique combination of CustomerNa... | https://stackoverflow.com/questions/78367585/dax-query-calculating-incremental-growth-of-a-value-by-date | powerbi, dax, data-analysis, powerbi-desktop, calculated-columns | 1,713,802,434 |
se_78367898 | stackoverflow | DATA_SCIENCE | pgAdmin not opening on macOS High Sierra | pgAdmin not opening on macOS High Sierra
Hello I'm currently trying to expand my skill set and learn SQL. When trying to open pgAdmin I don't get an error code nor any other messages the application simply won't open in chrome/safari. I've downloaded multiple versions of both pgadmin and postgresql and still got the ... | https://stackoverflow.com/questions/78367898/pgadmin-not-opening-on-macos-high-sierra | sql, postgresql, data-analysis, pgadmin | 1,713,806,119 |
se_78354939 | stackoverflow | DATA_SCIENCE | How to make CALCULATE measure for last date exists before date in current row? | How to make CALCULATE measure for last date exists before date in current row?
I got this table:
rounds_bot_date
values
1
2024-04-09
10
2
2024-04-10
20
0
2024-04-11
30
3
2024-04-15
40
4
2024-04-16
50
5
2024-04-17
60
How to make CALCULATE(SUM('table'[values]) with filter for last existing date befo... | https://stackoverflow.com/questions/78354939/how-to-make-calculate-measure-for-last-date-exists-before-date-in-current-row | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,713,542,424 |
se_78349168 | stackoverflow | DATA_SCIENCE | Convolved gaussian issue | Convolved gaussian issue
I have this code that aims to fit the data in here https://drive.google.com/file/d/1oXTf4Ns60N6-JTI19vr_UKpvEM1qk31m/view?usp=sharing
Where the function read_file is used to extract the information in a proper way.
The issue lies in ensuring proper relations between the amplitudes extracted us... | https://stackoverflow.com/questions/78349168/convolved-gaussian-issue | python, plot, data-analysis, gaussian | 1,713,459,339 |
se_78348833 | stackoverflow | DATA_SCIENCE | How to select categorical features and numerical features for running train test? | How to select categorical features and numerical features for running train test?
I was trying to concatenate two lists of features with different lengths which was causing a ValueError because the shapes of the two lists cannot be broadcast together. I was trying to select categorical and numerical features from the ... | https://stackoverflow.com/questions/78348833/how-to-select-categorical-features-and-numerical-features-for-running-train-test | python, pandas, dataframe, data-analysis, data-cleaning | 1,713,455,700 |
se_78344177 | stackoverflow | DATA_SCIENCE | Can't Navigate to the next page while web scrapin | Can't Navigate to the next page while web scrapin
I was trying to extract the required skills to work as a data analyst to make an analysis project to know the most wanted skills
My code is working fine till the part of navigating to the next page to extract the rest of the jobs information
But i have been trying ... | https://stackoverflow.com/questions/78344177/cant-navigate-to-the-next-page-while-web-scrapin | python, selenium-webdriver, web-scraping, selenium-chromedriver, data-analysis | 1,713,397,538 |
se_78344088 | stackoverflow | DATA_SCIENCE | Why is my LDA model predicting incorrectly in R? | Why is my LDA model predicting incorrectly in R?
My LDA model is incorrectly predicting my variable with a factor level of 1 as 0. I'm not sure how to go about fixing the model.
Here is my code:
#LDA
lda.model = lda(factor(Donation) ~ Age + Home + NumberOfChild, data = dftrain)
predictions.lda = predict(lda.model, ne... | https://stackoverflow.com/questions/78344088/why-is-my-lda-model-predicting-incorrectly-in-r | r, data-analysis, lda | 1,713,394,851 |
se_53100599 | stackoverflow | DATA_SCIENCE | Applying the same operations on multiple .csv file in pandas | Applying the same operations on multiple .csv file in pandas
I have six .csv files. They overall size is approximately 4gigs. I need to clean each and do some data analysis task on each. These operations are the same for all the frames.
This is my code for reading them.
#df = pd.read_csv(r"yellow_tripdata_2018-01.csv... | https://stackoverflow.com/questions/53100599/applying-the-same-operations-on-multiple-csv-file-in-pandas | python, pandas, csv, data-analysis | 1,541,072,526 |
se_78337690 | stackoverflow | DATA_SCIENCE | How to replace EARLIER function in DAX Calculated Column? | How to replace EARLIER function in DAX Calculated Column?
I recently read that you should not use the EARLIER function. I recently inherited a dataset file that uses this function and it keeps crashing, likely due to the EARLIER function. I am trying to convert this formula into the proper format using variables but I... | https://stackoverflow.com/questions/78337690/how-to-replace-earlier-function-in-dax-calculated-column | powerbi, dax, data-analysis, powerbi-desktop, calculated-columns | 1,713,309,383 |
se_76909948 | stackoverflow | DATA_SCIENCE | Creating a Year-wise Bar Chart Visualization from CSV Data | Creating a Year-wise Bar Chart Visualization from CSV Data
Problem:
I'm working on a data visualization project where I want to create a bar chart similar to the one shown in this . The image is from a story available here.
My Effort:
I've written Python code using pandas, seaborn, and matplotlib to visualize the data... | https://stackoverflow.com/questions/76909948/creating-a-year-wise-bar-chart-visualization-from-csv-data | python, pandas, visualization, data-analysis, graph-visualization | 1,692,149,220 |
se_78332150 | stackoverflow | DATA_SCIENCE | In each column of a data frame , how to find out the duration for which each unique value in a column existed? | In each column of a data frame , how to find out the duration for which each unique value in a column existed?
Example , consider the
df:
Time colA colB
0 1.1 2 2
1 2.2 2 2
2 3.4 3 5
3 4.5 3 5
4 5.6 4 5
5 6.2 4 6
6 7.4 4 ... | https://stackoverflow.com/questions/78332150/in-each-column-of-a-data-frame-how-to-find-out-the-duration-for-which-each-uni | python, pandas, dataframe, logic, data-analysis | 1,713,242,329 |
se_78328212 | stackoverflow | DATA_SCIENCE | Geographical representation of (italian) data | Geographical representation of (italian) data
I've started a (unpaid mandatory) intership and they basically gave me a massive csv sheet with uncleaned data to make sense of. I managed to clean it up and I now have created a SQL database with all the info, and I would love to get a geographical representation of the d... | https://stackoverflow.com/questions/78328212/geographical-representation-of-italian-data | sql, data-analysis, geo | 1,713,182,242 |
se_78328495 | stackoverflow | DATA_SCIENCE | QTD and YTD in DAX | QTD and YTD in DAX
I would like to calculate QTD and YTD in Dax. But the fiscal year starts from 1st of May. Is there a way to shift the fiscal year start month in DAX ? Many thanks in advance.
QTD =
CALCULATE(
[measure],
DATESQTD('Calendar'[Date])
) | https://stackoverflow.com/questions/78328495/qtd-and-ytd-in-dax | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,713,185,133 |
se_78326577 | stackoverflow | DATA_SCIENCE | Negative zero values - Power BI | Negative zero values - Power BI
Why Power BI visual shows negative zero amount? The specific mesaure is formated as "Currency" at 2 decimal places. I have also filter out anything with zero but these values remain.
Any help will be appreciated. | https://stackoverflow.com/questions/78326577/negative-zero-values-power-bi | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,713,164,396 |
se_74356002 | stackoverflow | DATA_SCIENCE | AttributeError: 'str' object has no attribute 'request' - YouTube data API | AttributeError: 'str' object has no attribute 'request' - YouTube data API
YouTube data API:
AttributeError: 'str' object has no attribute 'request'
I am trying to fetch data from YouTube data API v3 in Python but I am getting:
AttributeError: 'str' object has no attribute 'request'
Here is the cod... | https://stackoverflow.com/questions/74356002/attributeerror-str-object-has-no-attribute-request-youtube-data-api | python, google-api, data-analysis, youtube-data-api | 1,667,884,996 |
se_78324360 | stackoverflow | DATA_SCIENCE | Parallelperiod function returns nothing in DAX | Parallelperiod function returns nothing in DAX
I want to get total sales of the previous year.
In orders table, I create a column like this:
PreviousYearSales=CALCULATE(SUMX(RELATEDTABLE('Order Details'),'Order Details'[Sales]),PARALLELPERIOD(Orders[OrderDate],-1,YEAR))
This formula returns an empty column. How to ge... | https://stackoverflow.com/questions/78324360/parallelperiod-function-returns-nothing-in-dax | powerbi, dax, data-analysis, powerbi-desktop, calculated-columns | 1,713,109,946 |
se_73962288 | stackoverflow | DATA_SCIENCE | DAX Calc. Column with true/false entry only in latest instance per category | DAX Calc. Column with true/false entry only in latest instance per category
I would need the fourth, calculated column, to the below ex. table. Category is 'case' and entry is in the latest 'date' record per category, based on the 'result' from the latest 'date'
Thanks! | https://stackoverflow.com/questions/73962288/dax-calc-column-with-true-false-entry-only-in-latest-instance-per-category | powerbi, dax, data-analysis, powerbi-desktop, data-cleaning | 1,664,981,558 |
se_73746163 | stackoverflow | DATA_SCIENCE | Is merge in PowerBi only apply on current dataset or will that effect on future data? | Is merge in PowerBi only apply on current dataset or will that effect on future data?
So i have 2 dataset, lets say table A and table B.
Table A always has new data come in and it associate with a date column.
Table B is a fact table and its temporary wont change.
So, i need to create a visual and i need data from bot... | https://stackoverflow.com/questions/73746163/is-merge-in-powerbi-only-apply-on-current-dataset-or-will-that-effect-on-future | powerbi, powerquery, data-analysis, powerbi-desktop | 1,663,337,762 |
se_73357216 | stackoverflow | DATA_SCIENCE | How to transpose in power bi desktop | How to transpose in power bi desktop
I am having a table with 3 columns, where I need to transpose using Power Bi desktop. This is the structure I need:
I started using Power Query Editor, but seems like it to not transforming the way I need in the picture above. Any ideas? | https://stackoverflow.com/questions/73357216/how-to-transpose-in-power-bi-desktop | powerbi, powerquery, data-analysis, powerbi-desktop, data-cleaning | 1,660,541,419 |
se_72977171 | stackoverflow | DATA_SCIENCE | PowerBI DAX - Sum table by criteria and date | PowerBI DAX - Sum table by criteria and date
relatively new to PowerBI/PowerQuery/DAX and have become stuck at the following problem. I am unsure what road to go down to get the best outcome and would appreciate any help.
My data table is connected to a time tracking application. A User will enter a time entry everyti... | https://stackoverflow.com/questions/72977171/powerbi-dax-sum-table-by-criteria-and-date | powerbi, dax, powerquery, data-analysis, powerbi-desktop | 1,657,785,811 |
se_78308780 | stackoverflow | DATA_SCIENCE | Using a DAX Count rows / Treatas measure with a subtraction element | Using a DAX Count rows / Treatas measure with a subtraction element
I'm very new to DAX but I'm trying to increase my understanding on a daily basis. My current problem is that I have the following measure that allows me to show a running count of activities in a table. The data revolves around the period a piece of d... | https://stackoverflow.com/questions/78308780/using-a-dax-count-rows-treatas-measure-with-a-subtraction-element | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,712,820,541 |
se_78306723 | stackoverflow | DATA_SCIENCE | Having trouble reading a csv file with embedded commas in some values | Having trouble reading a csv file with embedded commas in some values
I am using clean dataset from this kaggle, for a school project and i have to write code in c++ that sorts the data and allows me to run statistical analysis on the data.
https://www.kaggle.com/datasets/elvinrustam/ebay-laptops-and-netbooks-sales/da... | https://stackoverflow.com/questions/78306723/having-trouble-reading-a-csv-file-with-embedded-commas-in-some-values | c++, database, csv, data-analysis, analysis | 1,712,777,572 |
se_78305201 | stackoverflow | DATA_SCIENCE | PowerBI Chart of monthly differences with specific month labels | PowerBI Chart of monthly differences with specific month labels
I'm going to make in PowerBI chart with monthly differences in sales. I have data as below - sales and two types of date:
DATE_YYYYMM
DATE_MMMYY
SALES
202401
Jan'24
100
202401
Jan'24
110
202402
Feb'24
110
202402
Feb'24
120
202403
Mar'24
120... | https://stackoverflow.com/questions/78305201/powerbi-chart-of-monthly-differences-with-specific-month-labels | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,712,759,760 |
se_78304403 | stackoverflow | DATA_SCIENCE | how to remove zeros after rounding in DAX? | how to remove zeros after rounding in DAX?
I would like to round 18,846,888 as 18,847. While ROUNDUP(18,846,888, 3) generates 18,847,000.
my Expected Answer 18,847K | https://stackoverflow.com/questions/78304403/how-to-remove-zeros-after-rounding-in-dax | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,712,751,930 |
se_77289154 | stackoverflow | DATA_SCIENCE | Execute KNIME workflow with python in jupyter lab | Execute KNIME workflow with python in jupyter lab
I am trying to execute a simple KNIME workflow with python in jupyter lab and also looking to pass the filename for the KNIME workflow through python and to get the output on the jupyter lab.
I am able to get the KNIME workflow with:
knime.Workflow(workflow_path=workfl... | https://stackoverflow.com/questions/77289154/execute-knime-workflow-with-python-in-jupyter-lab | python, jupyter-notebook, data-analysis, knime, exploratory-data-analysis | 1,697,212,481 |
se_78290822 | stackoverflow | DATA_SCIENCE | Dynamically Generate Target in Matrix Using DAX | Dynamically Generate Target in Matrix Using DAX
I have a Matrix visual in Power BI where I'm attempting to count various values by categories and sum them up as you +/- through:
The issue comes where there is no value within that date range, so for example on 3/03/2024:
Note how it totals up to 18, and not 24. That ... | https://stackoverflow.com/questions/78290822/dynamically-generate-target-in-matrix-using-dax | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,712,560,944 |
se_78294920 | stackoverflow | DATA_SCIENCE | Select Unique Pairs from Pyspark Dataframe | Select Unique Pairs from Pyspark Dataframe
Let's assume, I have a PySpark data frame:
X Y
1 a
1 b
1 c
2 b
2 a
2 c
3 a
3 c
3 b
4 p
I have to select any possible pair, of X and Y, but same X and Y should not be repeated in result.
Possible output 1
X Y
1 b
2 c
3 a
4 p
Possible output 2
X Y
2 a
1 b
3 c
4 p
How to achi... | https://stackoverflow.com/questions/78294920/select-unique-pairs-from-pyspark-dataframe | python, apache-spark, pyspark, apache-spark-sql, data-analysis | 1,712,607,589 |
se_73129450 | stackoverflow | DATA_SCIENCE | Remove a page filter from a drill through | Remove a page filter from a drill through
On a table of multiple columns, three columns form a hierarchical relationship:
Award Code (example: 505115)
Major Class code (example: 12XX)
Class Code (example: 1230)
There are three more columns: budget, actuals, and available budget (shown above).
On the second page of r... | https://stackoverflow.com/questions/73129450/remove-a-page-filter-from-a-drill-through | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,658,867,564 |
se_74346106 | stackoverflow | DATA_SCIENCE | Get Percentiles per group in PowerBI | Get Percentiles per group in PowerBI
I am trying to calculate percentiles for Bid/Ask prices for a large group of Bond ISINs. Specifically I have my data formatted like below:
Securities
PxBid
PxAsk
PxMid
GroupID
Q1
Q3
AT0000A04967
113.598
114.198
113.898
1
113.7073
114.0221
AT0000A04967
113.684
114.152
113.... | https://stackoverflow.com/questions/74346106/get-percentiles-per-group-in-powerbi | powerbi, dax, data-analysis, powerbi-desktop, calculated-columns | 1,667,821,682 |
se_75134231 | stackoverflow | DATA_SCIENCE | How to flatten a hierarchy in PowerBI? | How to flatten a hierarchy in PowerBI?
Imagine this table:
Level
Name
Parent
LevelA
Fruit
LevelB
Apple
Fruit
LevelA
Moving
LevelB
FourWheelers
Moving
LevelC
Car
FourWheelers
LevelC
Truck
FourWheelers
what I try to achieve is a hierarchy which looks like that:
Fruit
Apple
Moving
FourWheele... | https://stackoverflow.com/questions/75134231/how-to-flatten-a-hierarchy-in-powerbi | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,673,872,040 |
se_74692055 | stackoverflow | DATA_SCIENCE | DAX Nesting Multiple IF statements | DAX Nesting Multiple IF statements
I have 3 IF statements, each in a separate column...
Column 1 = IF(RELATED(dim_verification_measure5[measure_check_type])="min",IF([measure_value]<RELATED(dim_verification_measure5[measure_target_value_min]),20,10))
Column 2 = IF(RELATED(dim_verification_measure5[measure_check_type])... | https://stackoverflow.com/questions/74692055/dax-nesting-multiple-if-statements | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,670,261,112 |
se_74754793 | stackoverflow | DATA_SCIENCE | How to get another table from the same sql data source without having to type the server name and database name again? | How to get another table from the same sql data source without having to type the server name and database name again?
In power bi, how do I get another table from the same sql data source without having to type the server name and database name again?
Sorry if this is a very silly question, I am a beginner on this to... | https://stackoverflow.com/questions/74754793/how-to-get-another-table-from-the-same-sql-data-source-without-having-to-type-th | powerbi, powerquery, data-analysis, powerbi-desktop | 1,670,690,507 |
se_74864598 | stackoverflow | DATA_SCIENCE | How is it possible for DAX syntax to reference the original table name when using table variables? | How is it possible for DAX syntax to reference the original table name when using table variables?
This question comes from an example that I'm trying to understand in The Definitive Guide to DAX, Second Edition chapter 4. If you want the sample Power BI file, you can download it from the website above; it's Figure 4-... | https://stackoverflow.com/questions/74864598/how-is-it-possible-for-dax-syntax-to-reference-the-original-table-name-when-usin | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,671,546,576 |
se_75367203 | stackoverflow | DATA_SCIENCE | Hiding/obfuscating all but one legend on the x-axis | Hiding/obfuscating all but one legend on the x-axis
Let's say I have a table listing employee names, certain performance aspects and scores, something like:
Name | Measure | Score
Alice| A | 10
Alice| B | 5
Alice| C | 7
Bob | A | 8
Bob | B | 5
Bob | C | 4
Carol| A |... | https://stackoverflow.com/questions/75367203/hiding-obfuscating-all-but-one-legend-on-the-x-axis | powerbi, dax, visualization, data-analysis, powerbi-desktop | 1,675,722,292 |
se_75343764 | stackoverflow | DATA_SCIENCE | How to build a custom column formula in Power query that will retrieve Image and load it to Excel to display that image from the specified column | How to build a custom column formula in Power query that will retrieve Image and load it to Excel to display that image from the specified column
So I'm trying build this custom column formula that will return the image from the specified column URL and then load it to Excel. But somehow it's not working.
Basically I ... | https://stackoverflow.com/questions/75343764/how-to-build-a-custom-column-formula-in-power-query-that-will-retrieve-image-and | excel, excel-formula, powerquery, data-analysis | 1,675,497,909 |
se_78296807 | stackoverflow | DATA_SCIENCE | Dynamically find median in Power BI based on two columns? | Dynamically find median in Power BI based on two columns?
I got this type of table:
quantity
price
0
1
12
1
2
10
2
3
5
3
1
7
I need to find median price.
But first I need make array with prices:
[12, 10, 10, 5, 5, 5, 7]
So I need make duplicates of price values. And count median for this array.
How to... | https://stackoverflow.com/questions/78296807/dynamically-find-median-in-power-bi-based-on-two-columns | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,712,648,150 |
se_73992347 | stackoverflow | DATA_SCIENCE | How to position text at the top edge of a VegaLite chart? | How to position text at the top edge of a VegaLite chart?
I am trying to create a VegaLite chart with labelled highlighted areas which are specified in a separate dataset using [min_x, max_x] coordinates.
I've managed to highlight the area itself using a rect mark, but I'm struggling to properly position the label at ... | https://stackoverflow.com/questions/73992347/how-to-position-text-at-the-top-edge-of-a-vegalite-chart | json, charts, visualization, data-analysis, vega-lite | 1,665,174,850 |
se_73080480 | stackoverflow | DATA_SCIENCE | Power Bi: how to parameterize Top N visual level filter | Power Bi: how to parameterize Top N visual level filter
Since PowerBI don't support Top N filter on page level,
I want to use N as a parameter to change it at once per multiple visuals.
Is it possible?
P.S.In this video (9:15) solution for more complex case is provided.
In the end of this article sample file availabl... | https://stackoverflow.com/questions/73080480/power-bi-how-to-parameterize-top-n-visual-level-filter | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,658,493,396 |
se_72651163 | stackoverflow | DATA_SCIENCE | How do I sort a stacked bar chart in Power BI: sort by another column | How do I sort a stacked bar chart in Power BI: sort by another column
I am using 100% Stacked Bar chart and am unable to sort how I want.
Here is a sample dataset.
person
Item
order bought
rank preferred
Spend
1
Bike
1
1
600
1
Watch
2
3
250
1
Tickets
3
2
1000
2
Bike
2
3
100
2
Watch
3
2
400
2
Tickets
... | https://stackoverflow.com/questions/72651163/how-do-i-sort-a-stacked-bar-chart-in-power-bi-sort-by-another-column | charts, powerbi, visualization, data-analysis, powerbi-desktop | 1,655,408,734 |
se_72692695 | stackoverflow | DATA_SCIENCE | Data from web - DataSource.Error - unable to retrieve contents of page | Data from web - DataSource.Error - unable to retrieve contents of page
I'm trying to get a table from a webpage, but I cannot seem to get PowerBI to correctly load that page.
The url is https://www.argentorshop.be/verkoop-uw-edelmetaal-aan-argentorshop/verkoop-uw-goudstaven-en-of-gouden-munten-aan-argentor/
The table ... | https://stackoverflow.com/questions/72692695/data-from-web-datasource-error-unable-to-retrieve-contents-of-page | powerbi, powerquery, data-analysis, powerbi-desktop, m | 1,655,757,288 |
se_75860643 | stackoverflow | DATA_SCIENCE | Return string for category based on max value | Return string for category based on max value
I'm attempting to return the color for which the vehicle had the highest sales. My [sales] table looks like so:
Vehicle
Color
Sold
Car
Blue
5
Car
Red
8
Truck
Silver
10
Truck
Orange
4
I created a table listing the vehicle as a column and now I need my dax ... | https://stackoverflow.com/questions/75860643/return-string-for-category-based-on-max-value | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,679,953,668 |
se_76338087 | stackoverflow | DATA_SCIENCE | formatting text marks in a hconcat composition | formatting text marks in a hconcat composition
I have this gist: my sample table
I have two questions:
Can I control the spacing between the 2nd "sumofvals" and the 3rd "the individuals" view control separately, I want them closer together
Can I extend the coloring to the "header" as well
Tom | https://stackoverflow.com/questions/76338087/formatting-text-marks-in-a-hconcat-composition | powerbi, data-analysis, powerbi-desktop, vega-lite, deneb | 1,685,081,837 |
se_76283165 | stackoverflow | DATA_SCIENCE | How to assign y axes and scales to the layers in Dual-Axis multi-layer charts | How to assign y axes and scales to the layers in Dual-Axis multi-layer charts
I have a multi-layer visual showing actuals as a bar chart w. text marks aka labels, and a few different goals showing as line charts.
Note: this is just a minimalistic test case. The real visual is more complex and looks differently.
Is it ... | https://stackoverflow.com/questions/76283165/how-to-assign-y-axes-and-scales-to-the-layers-in-dual-axis-multi-layer-charts | json, charts, visualization, data-analysis, vega-lite | 1,684,431,176 |
se_75791253 | stackoverflow | DATA_SCIENCE | Aggregate values by a distinct identifier in Power BI using DAX | Aggregate values by a distinct identifier in Power BI using DAX
Here my table:
When I create a summed table by group_no I have below table in Power BI:
However, this is what I would like to have:
So, what I would like to get is total revenue by unique project_no on Groups (group_no). | https://stackoverflow.com/questions/75791253/aggregate-values-by-a-distinct-identifier-in-power-bi-using-dax | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,679,321,069 |
se_75770791 | stackoverflow | DATA_SCIENCE | Can DAX time intelligence be used without a date table? | Can DAX time intelligence be used without a date table?
I have a data model with the date table having 5 calendars. The 1st column of the date tavle is CalendarName.
On the report the user is forced to choose 1 CalendarName.
Since date table has multiple calendars (5), 1 day repeats 5 times. Hence the table cannot be ... | https://stackoverflow.com/questions/75770791/can-dax-time-intelligence-be-used-without-a-date-table | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,679,076,211 |
se_73692495 | stackoverflow | DATA_SCIENCE | Dax calculate a metric for another day in the calendar table | Dax calculate a metric for another day in the calendar table
I have a table with a date column and a money column:
Thedate CashCollected
2039-12-28 100
2039-12-27 200
2039-12-26 300
2039-12-25 400
2039-12-24 500
2039-12-23 600
2039-12-22 700
2039-12-21 800
and then I have the date table with the date and the ... | https://stackoverflow.com/questions/73692495/dax-calculate-a-metric-for-another-day-in-the-calendar-table | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,663,000,570 |
se_73624065 | stackoverflow | DATA_SCIENCE | Conditional Merge in Power Query | Conditional Merge in Power Query
I have 2 data sources FirstAPI and SecondAPI:
FirstAPI
appId
policyTypeName
policyTypeId
abcd
Global
null
pqrs
null
1
pqws
Global
null
SecondAPI
policyTypeName
policyTypeId
Americas
1
Global
2
The values are all one-to-one mapping.
RESULT : I am trying to ... | https://stackoverflow.com/questions/73624065/conditional-merge-in-power-query | excel, powerbi, powerquery, data-analysis, powerbi-desktop | 1,662,476,058 |
se_74211579 | stackoverflow | DATA_SCIENCE | Excel Power Query How to add new column determining most recent and 2nd most recent dates (current vs prior) | Excel Power Query How to add new column determining most recent and 2nd most recent dates (current vs prior)
I have a data set that has Report Date with some fields. I would like to add a column (ex. Status) using excel power query that determines the most recent date (ex. 3/1/2022) and assigns "Current", and the seco... | https://stackoverflow.com/questions/74211579/excel-power-query-how-to-add-new-column-determining-most-recent-and-2nd-most-rec | excel, powerquery, data-analysis, data-cleaning, m | 1,666,803,639 |
se_74199874 | stackoverflow | DATA_SCIENCE | dax contains() not showing Tru but should be | dax contains() not showing Tru but should be
I'm stumped here. I have this measure.
Contains = IF(CONTAINS(Flags, Flags[FlagsConcat], SELECTEDVALUE(SlicerFlags[FlagNames])),1,-1)
The concatenated column looks something like this
Flags
id Bco Nat Gur Ga An Sim Oak Ort FlagsConcat
1826 0 0 0 0 0 0... | https://stackoverflow.com/questions/74199874/dax-contains-not-showing-tru-but-should-be | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,666,729,974 |
se_74238187 | stackoverflow | DATA_SCIENCE | Power BI Custom Visual Parliament Chart | Power BI Custom Visual Parliament Chart
I Have been given a project to produce a european parliament seating arrangement visual. I have tried to seart on the net without luck.
Can anyone sugest any custom visual that look like below? | https://stackoverflow.com/questions/74238187/power-bi-custom-visual-parliament-chart | powerbi, visualization, data-analysis, powerbi-desktop, deneb | 1,666,974,069 |
se_74237775 | stackoverflow | DATA_SCIENCE | Filter for last 120 minutes in power query | Filter for last 120 minutes in power query
I want to filter a Date/Time column for the latest 120 minutes.
This is not working:
= Table.SelectRows(#"Added Custom", each [#"Datum/Tid"] >=Duration.Minutes(DateTime.LocalNow() -(120))
let
Source = Table.Combine({tab_Silosar, tab_Mjölk, tab_Grädde, tab_Restmjölk, tab... | https://stackoverflow.com/questions/74237775/filter-for-last-120-minutes-in-power-query | excel, powerbi, powerquery, data-analysis, powerbi-desktop | 1,666,971,842 |
se_74808549 | stackoverflow | DATA_SCIENCE | Can you explain the usage of VALUES in this case? | Can you explain the usage of VALUES in this case?
This is the code for the measure:
Sales of Audio (VALUES) =
CALCULATE(
[Total Sales],
'Product Category'[Category] = "Audio",
VALUES( 'Product Category'[Category] )
)
In the table, it doesn't show the sales of every category other than Audio? Why are thes... | https://stackoverflow.com/questions/74808549/can-you-explain-the-usage-of-values-in-this-case | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,671,091,964 |
se_72887184 | stackoverflow | DATA_SCIENCE | Calculating running count and percentages from long-type data | Calculating running count and percentages from long-type data
I have a dataset that looks like so:
ID_SALE
PRODUCT
STORE
SE_056
AAA
NORTH
XT-558
AAA
NORTH
8547Y
AAA
NORTH
TY856
BBB
NORTH
D-895
BBB
SOUTH
ER5H
CCC
SOUTH
5F6F-GD
CCC
SOUTH
65-FFD
TTT
SOUTH
56-YU
UUU
SOUTH
I want to be able to p... | https://stackoverflow.com/questions/72887184/calculating-running-count-and-percentages-from-long-type-data | powerbi, dax, data-analysis, powerbi-desktop | 1,657,125,958 |
se_72965170 | stackoverflow | DATA_SCIENCE | SUMMARIZE - Not allowing me to add a related table | SUMMARIZE - Not allowing me to add a related table
A co-worker has asked me to help her with an issue she is having. Her data model looks as follows:
She is using SUMMARIZE to build the Jobs table. In part, the DAX looks like this:
Jobs = SUMMARIZE(
'MainSI Table',
'MainSI Table'[Market],
'MainSI Table'[R... | https://stackoverflow.com/questions/72965170/summarize-not-allowing-me-to-add-a-related-table | powerbi, dax, data-analysis, powerbi-desktop | 1,657,710,000 |
se_77254373 | stackoverflow | DATA_SCIENCE | Power BI DAX: DATEADD using calculated date and interval | Power BI DAX: DATEADD using calculated date and interval
I'm hoping someone could help me with my problem:
The first table is my Data and the second table is the summary that I'm trying to achieve using DAX Measure in Power BI. I was able to do all except for the last column; Next Expected Order Date.
So basically, I... | https://stackoverflow.com/questions/77254373/power-bi-dax-dateadd-using-calculated-date-and-interval | powerbi, dax, data-analysis, powerbi-desktop | 1,696,781,877 |
se_72674108 | stackoverflow | DATA_SCIENCE | How to calculate average win rate among all the student using DAX in PowerBI | How to calculate average win rate among all the student using DAX in PowerBI
Hi everyone,
I have a sample data as shown in the screenshot above. There are 3 students with different ID : student 123, student 234, student 456. The profit column in the table is how much they earn in each trade.
Winning trade = profit > ... | https://stackoverflow.com/questions/72674108/how-to-calculate-average-win-rate-among-all-the-student-using-dax-in-powerbi | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,655,609,739 |
se_73055041 | stackoverflow | DATA_SCIENCE | Daily stock price changes and price returns per company | Daily stock price changes and price returns per company
I have stock prices in a table:
Date
Company
Price
2022-07-06
AAPL
142.92
2022-07-06
AMZN
114.33
2022-07-06
MSFT
266.21
2022-07-07
AAPL
146.35
2022-07-07
AMZN
116.33
2022-07-07
MSFT
268.4
2022-07-08
AAPL
147.04
2022-07-08
AMZN
115.54
2022-... | https://stackoverflow.com/questions/73055041/daily-stock-price-changes-and-price-returns-per-company | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,658,333,985 |
se_72901598 | stackoverflow | DATA_SCIENCE | Using Measure as a Filter Parameter | Using Measure as a Filter Parameter
The following code provides the desired result:
FY22 Cum Invoice Total =
var SetOfDates=DATESBETWEEN('Calendar'[Date],[FirstInvoiceMonthFY],[FirstDayThisMonth])
return
CALCULATE(
SUM('Invoice Amounts'[CLIN Total]),SetOfDates)
Since I use similar calculations repeatedly, I wante... | https://stackoverflow.com/questions/72901598/using-measure-as-a-filter-parameter | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,657,212,606 |
se_72972821 | stackoverflow | DATA_SCIENCE | Using Measure as Variable | Using Measure as Variable
The following measure works, but rather than making separate measures for each year, I want to use a variable in place of 2022.
Q1FY22 Cost = CALCULATE(
SUM('Invoice Amounts'[CLIN Total]),'Calendar'[Fiscal Year]=2022,'Calendar'[Fiscal Quarter]=1)
I created another measure,
ThisFY=2022
When I... | https://stackoverflow.com/questions/72972821/using-measure-as-variable | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,657,747,635 |
se_73035034 | stackoverflow | DATA_SCIENCE | How can one convert a number to ordinal form in powerquery | How can one convert a number to ordinal form in powerquery
is there a way to convert a rank number to ordinal form in powerquery.
For instance, Rank: 1, 2, 3, 4, 5, 31, 52 etc.This should be displayed as 1st, 2nd, 3rd, 4th, 5th, 31st 52nd.
Thank you! | https://stackoverflow.com/questions/73035034/how-can-one-convert-a-number-to-ordinal-form-in-powerquery | excel, powerquery, data-analysis, data-cleaning, m | 1,658,225,452 |
se_72269604 | stackoverflow | DATA_SCIENCE | DAX/PowerBI Rank taking a variable/parameter into account | DAX/PowerBI Rank taking a variable/parameter into account
I'm working on a ranking/scoring system and I'm missing the PERCENTRANK.INC function in powerBI. Instead I have worked out below formula which is the closest I can get.
Score =
DIVIDE (
RANKX (
FILTER ( 'Table', NOT ( ISBLANK ( [Sold amounts] ) ) ),... | https://stackoverflow.com/questions/72269604/dax-powerbi-rank-taking-a-variable-parameter-into-account | powerbi, dax, data-analysis, powerbi-desktop, measure | 1,652,771,534 |
se_72501491 | stackoverflow | DATA_SCIENCE | DAX to check if a value matches a value from another table | DAX to check if a value matches a value from another table
In PowerBi desktop I have two different tables with different data that share 1 column. The tables contain information about products and each table has a column titled "SKU ID". I want to create a measure that counts how many products have a matching SKU ID... | https://stackoverflow.com/questions/72501491/dax-to-check-if-a-value-matches-a-value-from-another-table | powerbi, dax, powerquery, data-analysis, powerbi-desktop | 1,654,361,013 |
se_72297110 | stackoverflow | DATA_SCIENCE | In PowerBI what options are there to hide/redact/mask values in visuals to anonymise data | In PowerBI what options are there to hide/redact/mask values in visuals to anonymise data
What options are there in PowerBI to suppress, redact or hide values to anonymise values in reports and visuals without loosing detail and have that restriction apply to multiple pages in a report?
Cat
Count
%
Category 1
... | https://stackoverflow.com/questions/72297110/in-powerbi-what-options-are-there-to-hide-redact-mask-values-in-visuals-to-anony | powerbi, dax, data-analysis, powerbi-desktop, data-modeling | 1,652,917,285 |
se_72523326 | stackoverflow | DATA_SCIENCE | PBI Report Matrix formatting - Values in Grand Total only | PBI Report Matrix formatting - Values in Grand Total only
I have a report requirement and I am using PBI to visualize. The layout required is very similar to the Matrix visual. I am trying to report on Measure (SCADA Volume) by date on the columns. I want some additional measures to print ONLY FOR THE GRAND TOTAL, aft... | https://stackoverflow.com/questions/72523326/pbi-report-matrix-formatting-values-in-grand-total-only | powerbi, dax, report, data-analysis, powerbi-desktop | 1,654,548,599 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.