Forum Discussion
Sum with Grouping
- 10 years ago
Are the groups static, or do they need to be dynamic based on a user selection?
If they're static, it's easy. Make a new field (preferably at your data source if you can, else in a query (e.g. in Power Query) before the data is added to the Power Pivot model) with those groups. Then you can just create visualizations against the new field that contains the group.
If they must be dynamic based on user selection, you'll have to give us some more detail on what your expected use case is, and the solution will be a bit more complex.
Smoupre: Appreciate all your help on this forum!
I am trying to follow your instruction here. My DAX command looks like this:
Aging = IF(TODAY()-jvw_Bill_AR_List[DaysOverdue]<=30,"0-30",IF(TODAY()-jvw_Bill_AR_List[DaysOverdue]<=60,"31-60",IF(TODAY()-jvw_Bill_AR_List[DaysOverdue]<=90,"61-90","Over 90")))
(The table is "jvw_Bill_AR_List" and the column is "DaysOverdue".)
When I do this, I encounter the error message:
"A single value for column "DaysOverdue" in table "jvw_Bill_AR_List" cannot be determined. ...(etc.)"
Any advice? Thanks.
MojoGene Are you trying to create a Column or Measure?
This should work if you are trying to create a Column!
Look at my answer here...
http://community.powerbi.com/t5/Desktop/Combining-2-different-if-statements-in-one/m-p/31388#M10802
- MojoGene10 years agoPost Patron
Sean:
Bingo! That was it. As a novice in this, I am still perplexed by the difference between measures and columns.
Thanks for your help.
- MojoGene10 years agoPost Patron
Sean:
I may have spoken too soon.
I was able to put in a calculated column with no syntax error appearing, but no matter what the value is in the DaysOverdue column the result returned is always "Over 120."
I examined the DaysOverdue column to make sure; indeed, there are plenty of values <120.
Any thoughts on wha tis happening?
- MojoGene10 years agoPost Patron
Sean:
Looks like I have found and answer. The "DaysOverdue" column was itself a calculated column. I was able to substitute another column in the table ([DateBilled]), which is an original column from the underlying SQL table. That solution worked perfectly.
So, am I to conclude that you cannot make a calculated column based on another calcuated column?