The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi all, I'm currently following a tutorial to use measures as a filter (video here). I'm running into a DAX issue when trying to use GENERATESERIES on a measure that I have.
At around 2:25 in the video, the presenter uses a measuer as the max part of GENERATESERIES. I have done this with 2 other measures with a simple SUM measure, but this measure I'm currently trying requires a DIVIDE. This is throwing an error to GENERATESERIES. Here is my measure:
Change % =
DIVIDE(
SUM('table1'[Numerator]),SUM('table1'[Denominator]),"-"
)
I'm formatting this as a percentage.
When I use this in a table create I get this error:
Obviously this is because I'm tryign to pass a percentage into GenerateSeries. I'm not sure how to fix this when I need the series to give a range of percentages.
Any ideas with this? Appreciate the help!
Solved! Go to Solution.
I don't think this has to do with percentage but rather the text data type you use for the third argument of DIVIDE, "-".
Try removing that or using 0 instead. You can format a zero as something else when you are displaying, but you don't want strings inside your math like that.
I don't think this has to do with percentage but rather the text data type you use for the third argument of DIVIDE, "-".
Try removing that or using 0 instead. You can format a zero as something else when you are displaying, but you don't want strings inside your math like that.
@AlexisOlson Great catch! I can't believe I missed that haha.
I had to also play around with the incremental value to get it to work since its basing the value as a decimal.
My code looks like this:
Change % Number Filter =
GENERATESERIES(0, [% Calc],0.0001)
Thank you! Accepting as solution!
User | Count |
---|---|
16 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
13 | |
13 | |
8 | |
8 |