You may want to describe what you are attempting and what you mean by "specfic variable"
I know that you likely don't like that your Log shows something like:
NOTE: No statistics are computed for Gender * Prices100 because Prices100 has less than 2 nonmissing levels.
You have restricted one of the variables to only allow one level, "RM101-RM400", and when you have a two-way chi-square the calculations just do not work that way as you are introducing a divide-by-zero condition.
You can run a chi-square on a single variable such as:
Proc freq data=sashelp.class;
tables age /chisq;
And the results reflect the levels of the single variable.
I suspect that you may have wanted if the question you wanted answered was "is the distribution of Gender the same/different when Prices100 has this specific value".
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.