The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello everyone,
Today I am asking you about a DAX measure. Indeed, for the calculation of a measure I need a variable. This variable is the turbidity value when the trubidity frequency in% between 0.20% and 0.21%:
The frequency calculation is a measure, here is the code:
Here is the code for the turbidity measurement:
What is the formula to fill in for the calculation of this variable please?
Thanks in advance,
Joel
Solved! Go to Solution.
It works for me @Anonymous so maybe I am not understanding what you expect the results to be. Remember, I know nothing about your data and without googling, I don't know what turbidity means. I've heard the term, but couldn't intelligently use it in a sentence. I am an accountant, not a scientist. So if this isn't what you need, explain the logic of how to get what you want and then we will see if we can write a measure that does that.
Some Measure =
MAXX(
FILTER(
ALL( Data ),
Data[Fréquence turbidité (%)] > .20
&& Data[Fréquence turbidité (%)] < .21
),
Data[Turbidité]
)
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingGlad I was able to help @Anonymous
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingIt works for me @Anonymous so maybe I am not understanding what you expect the results to be. Remember, I know nothing about your data and without googling, I don't know what turbidity means. I've heard the term, but couldn't intelligently use it in a sentence. I am an accountant, not a scientist. So if this isn't what you need, explain the logic of how to get what you want and then we will see if we can write a measure that does that.
Some Measure =
MAXX(
FILTER(
ALL( Data ),
Data[Fréquence turbidité (%)] > .20
&& Data[Fréquence turbidité (%)] < .21
),
Data[Turbidité]
)
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingHello @edhans and sorry for my response time.
Your formula was good it is in the choice of the table after "ALL (TABLE)" that I had not chosen the right data. Indeed my file is split into grouping of measures according to time intervals like this:
After choosing the right time interval your code worked perfectly!
Thanks again and have a nice day,
Joel
@Anonymous - did that help at all?
How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly - Give us a good and concise explanation
How to provide sample data in the Power BI Forum - Provide data in a table format per the link, or share an Excel/CSV file via OneDrive, Dropbox, etc.. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingA measure like this should work @Anonymous
Some Measure =
VAR varCurrentTurbidityFreq =
MAX( 'Table'[TurbidityFreq] )
RETURN
MAXX(
FILTER(
ALL( 'Table' ),
'Table'[TurbidityFreq] > .20
&& 'Table'[TurbidityFreq] < .21
),
'Table'[Turbidity]
)
I didn't test it though. You'd need to provide some test data. We cannot work with screenshots for test data, I'd have to key all of that in.
How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly - Give us a good and concise explanation
How to provide sample data in the Power BI Forum - Provide data in a table format per the link, or share an Excel/CSV file via OneDrive, Dropbox, etc.. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingHello @edhans,
Sorry for my response time.
Here is an excerpt of my PBIX in CSV format.
Thank you for your formula, unfortunately it does not work.
I hope the CSV file will bring more details.
Thank you in advance,
Joël
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
34 | |
31 | |
23 | |
18 | |
17 |
User | Count |
---|---|
61 | |
45 | |
33 | |
32 | |
30 |